Metadata-Version: 2.4
Name: truenaspy
Version: 1.0.2
Summary: Provides asynchronous authentication and access to Truenas devices
Author-email: Cyr-ius <cyr-ius@ipocus.net>
License: GPL-3
Project-URL: Homepage, https://github.com/cyr-ius/truenaspy
Keywords: async,truenas,scale,core
Platform: any
Classifier: Programming Language :: Python
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Topic :: Home Automation
Requires-Python: >=3.12.0
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.9.5
Requires-Dist: semantic_version>=2.10.0
Requires-Dist: mashumaro>=3.13
Dynamic: license-file

# Truenaspy

Fetch data from TrueNas

## Install

Use the PIP package manager

```bash
$ pip install truenaspy
```

Or manually download and install the last version from github

```bash
$ git clone https://github.com/cyr-ius/truenaspy.git
$ python setup.py install
```

## Get started

```python
# Import the truenaspy package.
from truenaspy import TruenasWebsocket

HOST="1.2.3.4:8080"

async def main():
    websocket = TruenasWebsocket(host=HOST, use_tls=True, verify_ssl=False)
    listener = await websocket.async_connect(USERNAME, PASSWORD)
    info = await ws.async_call(method="system.info")
    print(rlst)
    await websocket.async_close()

loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
asyncio.run(async_main())
```

Have a look at the [example.py](https://github.com/cyr-ius/truenaspy/blob/master/example.py) for a more complete overview.
