Name | gobtools JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | Library to control and interact with the Goblin ecosystem. |
upload_time | 2024-11-07 12:57:12 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
goblin
goblin miner
goblin weaver
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# GobTools
Library to control and interact with the Goblin ecosystem.
[![Apache-2.0](https://custom-icon-badges.herokuapp.com/badge/license-Apache%202.0-8BB80A.svg?logo=law&logoColor=white)]()
![Github Tag](https://img.shields.io/github/v/tag/Hietan/gobtools)
## What is GobTools?
GobTools streamlines access to GoblinWeaver.\
By simply passing information as arguments to Python functions, requests are sent effortlessly, and responses are returned as dictionaries.
Please refer to the [official repository](https://github.com/Goblin-Ecosystem/goblinWeaver.git) for more details about GoblinWeaver.
## Installation
- pip
Run the following command:
```
pip install git+https://github.com/Hietan/gobtools.git
```
- Rye
Run the following command in a rye project:
```
rye add gobtools --git https://github.com/Hietan/gobtools.git
```
## Usage
> [!TIP]
> GobTools requires that the GoblinWeaver API server is running.\
> Ensure the GoblinWeaver is started before using GobTools.\
> You may need to provide the API server's URL when using GobTools.
### 1. Import
Import the necessary module for creating a controller instance:
```python
from gobtools.weaver.controller import WeaverController
```
### 2. Instance Creation
Create an instance of the controller by specifying the URL of the GoblinWeaver API server.
```python
controller = WeaverController("<your-api-server-url>")
```
> [!NOTE]
> Replace `<your-api-server-url>` with the actual URL for you environment (e.g., "http://localhost:8080") where your GoblinWeaver server is running\
### 3. Get Data
Get all releases of an artifact from org.apache.logging.log4j:log4j-core with added values (`CVE`, `FRESHNESS`).\
The function `get_artifact_releases` sends POST requests to `<your-api-server-url>/artifact/releases`.\
You can receive the results as dictionary.
```python
releases = controller.get_artifact_releases(
"org.apache.logging.log4j",
"log4j-core",
["CVE", "FRESHNESS"]
)
```
Other REST API endpoints can also be accessed through GobTools function.\
For detailed API documentation, please refer to `<your-api-server-url>/swagger-ui/index.html`
### 4. Print Result
By using `json_format`, you can format and display the results.
```python
from gobtools.utils.json import json_format
print(json_format(releases))
```
Raw data
{
"_id": null,
"home_page": null,
"name": "gobtools",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "Goblin, Goblin Miner, Goblin Weaver",
"author": null,
"author_email": "Hietan <hietan622@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/b4/7f/2361f272080394a485cb16e3afffa70622c76ae6a77a201723ace8d4b1b0/gobtools-0.1.2.tar.gz",
"platform": null,
"description": "# GobTools\nLibrary to control and interact with the Goblin ecosystem.\n\n[![Apache-2.0](https://custom-icon-badges.herokuapp.com/badge/license-Apache%202.0-8BB80A.svg?logo=law&logoColor=white)]()\n![Github Tag](https://img.shields.io/github/v/tag/Hietan/gobtools)\n\n## What is GobTools?\n\nGobTools streamlines access to GoblinWeaver.\\\nBy simply passing information as arguments to Python functions, requests are sent effortlessly, and responses are returned as dictionaries.\n\nPlease refer to the [official repository](https://github.com/Goblin-Ecosystem/goblinWeaver.git) for more details about GoblinWeaver.\n\n## Installation\n\n- pip\n\nRun the following command:\n\n```\npip install git+https://github.com/Hietan/gobtools.git\n```\n\n- Rye\n\nRun the following command in a rye project:\n\n```\nrye add gobtools --git https://github.com/Hietan/gobtools.git\n```\n\n## Usage\n\n> [!TIP]\n> GobTools requires that the GoblinWeaver API server is running.\\\n> Ensure the GoblinWeaver is started before using GobTools.\\\n> You may need to provide the API server's URL when using GobTools.\n\n### 1. Import\n\nImport the necessary module for creating a controller instance:\n\n```python\nfrom gobtools.weaver.controller import WeaverController\n```\n\n### 2. Instance Creation\n\nCreate an instance of the controller by specifying the URL of the GoblinWeaver API server.\n\n```python\ncontroller = WeaverController(\"<your-api-server-url>\")\n```\n\n> [!NOTE]\n> Replace `<your-api-server-url>` with the actual URL for you environment (e.g., \"http://localhost:8080\") where your GoblinWeaver server is running\\\n\n### 3. Get Data\n\nGet all releases of an artifact from org.apache.logging.log4j:log4j-core with added values (`CVE`, `FRESHNESS`).\\\nThe function `get_artifact_releases` sends POST requests to `<your-api-server-url>/artifact/releases`.\\\nYou can receive the results as dictionary.\n\n```python\nreleases = controller.get_artifact_releases(\n \"org.apache.logging.log4j\", \n \"log4j-core\", \n [\"CVE\", \"FRESHNESS\"]\n)\n```\n\nOther REST API endpoints can also be accessed through GobTools function.\\\nFor detailed API documentation, please refer to `<your-api-server-url>/swagger-ui/index.html`\n\n### 4. Print Result\n\nBy using `json_format`, you can format and display the results.\n\n```python\nfrom gobtools.utils.json import json_format\n\nprint(json_format(releases))\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Library to control and interact with the Goblin ecosystem.",
"version": "0.1.2",
"project_urls": null,
"split_keywords": [
"goblin",
" goblin miner",
" goblin weaver"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "34e13bbd3bd0cdd252751b5a0ab2b930ac6d5076113a74561fb784034f22af1b",
"md5": "a051e4e9191e838074053999942ba746",
"sha256": "83ec458ae5242e06abcd4837247831d904d4d45804391a8f711c62e511ff08d7"
},
"downloads": -1,
"filename": "gobtools-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a051e4e9191e838074053999942ba746",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10057,
"upload_time": "2024-11-07T12:57:11",
"upload_time_iso_8601": "2024-11-07T12:57:11.356123Z",
"url": "https://files.pythonhosted.org/packages/34/e1/3bbd3bd0cdd252751b5a0ab2b930ac6d5076113a74561fb784034f22af1b/gobtools-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b47f2361f272080394a485cb16e3afffa70622c76ae6a77a201723ace8d4b1b0",
"md5": "1bc6bf58bbd91909c9ed276e15a64bea",
"sha256": "2b6eceb68d993a02379754ab94dffdafa31943a548ced33bdee5aedbe43c5f28"
},
"downloads": -1,
"filename": "gobtools-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "1bc6bf58bbd91909c9ed276e15a64bea",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 10004,
"upload_time": "2024-11-07T12:57:12",
"upload_time_iso_8601": "2024-11-07T12:57:12.517279Z",
"url": "https://files.pythonhosted.org/packages/b4/7f/2361f272080394a485cb16e3afffa70622c76ae6a77a201723ace8d4b1b0/gobtools-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-07 12:57:12",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "gobtools"
}