Library to control and interact with the Goblin ecosystem.
Project description
GobTools
Library to control and interact with the Goblin ecosystem.
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 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:
from gobtools.weaver.controller import WeaverController
2. Instance Creation
Create an instance of the controller by specifying the URL of the GoblinWeaver API server.
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.
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.
from gobtools.utils.json import json_format
print(json_format(releases))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gobtools-0.1.2.tar.gz.
File metadata
- Download URL: gobtools-0.1.2.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b6eceb68d993a02379754ab94dffdafa31943a548ced33bdee5aedbe43c5f28
|
|
| MD5 |
1bc6bf58bbd91909c9ed276e15a64bea
|
|
| BLAKE2b-256 |
b47f2361f272080394a485cb16e3afffa70622c76ae6a77a201723ace8d4b1b0
|
File details
Details for the file gobtools-0.1.2-py3-none-any.whl.
File metadata
- Download URL: gobtools-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83ec458ae5242e06abcd4837247831d904d4d45804391a8f711c62e511ff08d7
|
|
| MD5 |
a051e4e9191e838074053999942ba746
|
|
| BLAKE2b-256 |
34e13bbd3bd0cdd252751b5a0ab2b930ac6d5076113a74561fb784034f22af1b
|