Resoto Python client library
Project description
resotoclient-python
Python client for Resoto
Installation
pip install resotoclient
For GraphVis and Pandas support:
pip install resotoclient[extras]
Usage
from resotoclient import ResotoClient
client = ResotoClient(url="https://localhost:8900", psk="changeme")
instances_csv = client.cli_execute("search is(instance) | tail 5 | list --csv")
for instance in instances_csv:
print(instance)
Pandas Dataframes
df = client.dataframe("is(instance)")
GraphViz Digraph
graph = client.graphviz("is(graph_root) -->")
Test
The tests expect a ResotoCore on localhost with the default PSK changeme
.
You can start it locally via:
$> resotocore --graphdb-database resotoclient_test --psk changeme
A local test environment is required. See the contribution guide for instructions. When the virtual environment is available, use those commands to set up the project and run the tests:
$> pip install --upgrade pip poetry nox nox-poetry
$> nox
For more examples see the examples directory.
Publish
- bump the version number in pyproject.toml
poetry build
poetry publish
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
resotoclient-1.6.2.tar.gz
(21.5 kB
view details)
Built Distribution
File details
Details for the file resotoclient-1.6.2.tar.gz
.
File metadata
- Download URL: resotoclient-1.6.2.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2be8b056a01d95f623a308560ab1a5fc52f725465d565de77b1015c5ded9e849 |
|
MD5 | 6277d70f51a963188a9976b0f3af3e96 |
|
BLAKE2b-256 | 0b61256230e47499229843927030052de0c52e367ecc04df6af41f69e967d726 |
File details
Details for the file resotoclient-1.6.2-py3-none-any.whl
.
File metadata
- Download URL: resotoclient-1.6.2-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6ab10a63cd4dc56970924f26a73672f736e15f583106bf28731f0a13a2f7a16 |
|
MD5 | f0194dc1909d4e0cd666e6e4e6e9aa78 |
|
BLAKE2b-256 | 27595cbab4790e549ea1ca3c149ff641bbc9acb107dd56d1b7485e3fbda4621a |