Skip to main content

Library to control and interact with the Goblin ecosystem.

Project description

GobTools

Library to control and interact with the Goblin ecosystem.

Apache-2.0 Github Tag

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gobtools-0.1.2.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gobtools-0.1.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

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

Hashes for gobtools-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2b6eceb68d993a02379754ab94dffdafa31943a548ced33bdee5aedbe43c5f28
MD5 1bc6bf58bbd91909c9ed276e15a64bea
BLAKE2b-256 b47f2361f272080394a485cb16e3afffa70622c76ae6a77a201723ace8d4b1b0

See more details on using hashes here.

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

Hashes for gobtools-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 83ec458ae5242e06abcd4837247831d904d4d45804391a8f711c62e511ff08d7
MD5 a051e4e9191e838074053999942ba746
BLAKE2b-256 34e13bbd3bd0cdd252751b5a0ab2b930ac6d5076113a74561fb784034f22af1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page