# resotoclient-python
Python client for Resoto
## Installation
```bash
pip install resotoclient
```
For GraphVis and Pandas support:
```bash
pip install resotoclient[extras]
```
## Usage
```python
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
```python
df = client.dataframe("is(instance)")
```
### GraphViz Digraph
```python
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:
```bash
$> resotocore --graphdb-database resotoclient_test --psk changeme
```
A local test environment is required. See the [contribution guide](https://resoto.com/docs/contributing/components) for instructions.
When the virtual environment is available, use those commands to set up the project and run the tests:
```bash
$> 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`
Raw data
{
"_id": null,
"home_page": "https://github.com/someengineering/resotoclient-python",
"name": "resotoclient",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Some Engineering Inc.",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/0b/61/256230e47499229843927030052de0c52e367ecc04df6af41f69e967d726/resotoclient-1.6.2.tar.gz",
"platform": null,
"description": "# resotoclient-python\nPython client for Resoto\n\n## Installation\n```bash\npip install resotoclient\n```\n\nFor GraphVis and Pandas support:\n\n```bash\npip install resotoclient[extras]\n```\n\n## Usage\n```python\nfrom resotoclient import ResotoClient\n\nclient = ResotoClient(url=\"https://localhost:8900\", psk=\"changeme\")\ninstances_csv = client.cli_execute(\"search is(instance) | tail 5 | list --csv\")\n\nfor instance in instances_csv:\n print(instance)\n```\n\n### Pandas Dataframes\n```python\ndf = client.dataframe(\"is(instance)\")\n```\n\n### GraphViz Digraph\n```python\ngraph = client.graphviz(\"is(graph_root) -->\")\n```\n\n## Test\nThe tests expect a ResotoCore on localhost with the default PSK `changeme`.\nYou can start it locally via:\n\n```bash\n$> resotocore --graphdb-database resotoclient_test --psk changeme\n```\n\nA local test environment is required. See the [contribution guide](https://resoto.com/docs/contributing/components) for instructions.\nWhen the virtual environment is available, use those commands to set up the project and run the tests:\n\n```bash\n$> pip install --upgrade pip poetry nox nox-poetry\n$> nox\n```\n\nFor more examples see the examples directory.\n\n## Publish\n- bump the version number in pyproject.toml\n- `poetry build`\n- `poetry publish`\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Resoto Python client library",
"version": "1.6.2",
"project_urls": {
"Changelog": "https://github.com/someengineering/resotoclient-python/releases",
"Homepage": "https://github.com/someengineering/resotoclient-python",
"Repository": "https://github.com/someengineering/resotoclient-python"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "27595cbab4790e549ea1ca3c149ff641bbc9acb107dd56d1b7485e3fbda4621a",
"md5": "f0194dc1909d4e0cd666e6e4e6e9aa78",
"sha256": "a6ab10a63cd4dc56970924f26a73672f736e15f583106bf28731f0a13a2f7a16"
},
"downloads": -1,
"filename": "resotoclient-1.6.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f0194dc1909d4e0cd666e6e4e6e9aa78",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 24952,
"upload_time": "2024-01-15T11:54:50",
"upload_time_iso_8601": "2024-01-15T11:54:50.246198Z",
"url": "https://files.pythonhosted.org/packages/27/59/5cbab4790e549ea1ca3c149ff641bbc9acb107dd56d1b7485e3fbda4621a/resotoclient-1.6.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0b61256230e47499229843927030052de0c52e367ecc04df6af41f69e967d726",
"md5": "6277d70f51a963188a9976b0f3af3e96",
"sha256": "2be8b056a01d95f623a308560ab1a5fc52f725465d565de77b1015c5ded9e849"
},
"downloads": -1,
"filename": "resotoclient-1.6.2.tar.gz",
"has_sig": false,
"md5_digest": "6277d70f51a963188a9976b0f3af3e96",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 21466,
"upload_time": "2024-01-15T11:54:52",
"upload_time_iso_8601": "2024-01-15T11:54:52.200330Z",
"url": "https://files.pythonhosted.org/packages/0b/61/256230e47499229843927030052de0c52e367ecc04df6af41f69e967d726/resotoclient-1.6.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-15 11:54:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "someengineering",
"github_project": "resotoclient-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "resotoclient"
}