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.0.1.tar.gz
(19.8 kB
view hashes)
Built Distribution
Close
Hashes for resotoclient-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79ada196dda13f4e37a7b0dcf87a3efa1d3a99a615d6f0b3ef1f208f44bb59bb |
|
MD5 | 81ce6fc0d2318ade49f920c05c3f509d |
|
BLAKE2b-256 | c5013344c2f8acba3de7f1a73161b9cb0b5deefaf02e4e8443e71661412a1a97 |