# 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 TrueNASAPI
TOKEN="012345"
HOST="1.2.3.4:8080"
async def main():
api = TrueNASAPI(token=TOKEN, host=HOST, use_ssl=False, verify_ssl=False)
rslt = await api.async_get_system()
print(rlst)
await api.async_close()
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```
Have a look at the [example.py](https://github.com/cyr-ius/truenaspy/blob/master/example.py) for a more complete overview.
Raw data
{
"_id": null,
"home_page": null,
"name": "truenaspy",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12.0",
"maintainer_email": null,
"keywords": "async, truenas, scale, core",
"author": null,
"author_email": "Cyr-ius <cyr-ius@ipocus.net>",
"download_url": "https://files.pythonhosted.org/packages/0b/33/a91bb4076dc5e282cfa2c1c8eaa0e8f4a242724fc49d82ead2ef2a382bbe/truenaspy-0.7.9.tar.gz",
"platform": "any",
"description": "# Truenaspy\n\nFetch data from TrueNas\n\n## Install\n\nUse the PIP package manager\n\n```bash\n$ pip install truenaspy\n```\n\nOr manually download and install the last version from github\n\n```bash\n$ git clone https://github.com/cyr-ius/truenaspy.git\n$ python setup.py install\n```\n\n## Get started\n\n```python\n# Import the truenaspy package.\nfrom truenaspy import TrueNASAPI\n\nTOKEN=\"012345\"\nHOST=\"1.2.3.4:8080\"\n\nasync def main():\n api = TrueNASAPI(token=TOKEN, host=HOST, use_ssl=False, verify_ssl=False)\n rslt = await api.async_get_system()\n print(rlst)\n await api.async_close()\n\nloop = asyncio.get_event_loop()\nloop.run_until_complete(main())\n```\n\nHave a look at the [example.py](https://github.com/cyr-ius/truenaspy/blob/master/example.py) for a more complete overview.\n",
"bugtrack_url": null,
"license": "GPL-3",
"summary": "Provides asynchronous authentication and access to Truenas devices",
"version": "0.7.9",
"project_urls": {
"Homepage": "https://github.com/cyr-ius/truenaspy"
},
"split_keywords": [
"async",
" truenas",
" scale",
" core"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "96e7eb565a720eed8a370cf9fadd90ab97a0559cbdd80a59c9f34f50b37a9cfc",
"md5": "e519784fd1accf624b5c0522ad563bee",
"sha256": "567733d4b24c5ecd74d95c2de5894a17f7265d6878cb1fd5d7f4be443670fa1b"
},
"downloads": -1,
"filename": "truenaspy-0.7.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e519784fd1accf624b5c0522ad563bee",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12.0",
"size": 25468,
"upload_time": "2025-01-26T18:05:42",
"upload_time_iso_8601": "2025-01-26T18:05:42.291286Z",
"url": "https://files.pythonhosted.org/packages/96/e7/eb565a720eed8a370cf9fadd90ab97a0559cbdd80a59c9f34f50b37a9cfc/truenaspy-0.7.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0b33a91bb4076dc5e282cfa2c1c8eaa0e8f4a242724fc49d82ead2ef2a382bbe",
"md5": "042a355ca000ffb2a275fc05962eeeca",
"sha256": "6a5c4ec8bbc2f70f8cbe7b9908338960bebf82b449785c9c08784fb863a21ed7"
},
"downloads": -1,
"filename": "truenaspy-0.7.9.tar.gz",
"has_sig": false,
"md5_digest": "042a355ca000ffb2a275fc05962eeeca",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12.0",
"size": 28419,
"upload_time": "2025-01-26T18:05:43",
"upload_time_iso_8601": "2025-01-26T18:05:43.758734Z",
"url": "https://files.pythonhosted.org/packages/0b/33/a91bb4076dc5e282cfa2c1c8eaa0e8f4a242724fc49d82ead2ef2a382bbe/truenaspy-0.7.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-26 18:05:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cyr-ius",
"github_project": "truenaspy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "aiohttp",
"specs": [
[
">=",
"3.9.5"
]
]
},
{
"name": "semantic_version",
"specs": [
[
">=",
"2.10.0"
]
]
},
{
"name": "mashumaro",
"specs": [
[
">=",
"3.13"
]
]
}
],
"lcname": "truenaspy"
}