Asyncio-native Python client for the TrueNAS JSON-RPC WebSocket API
Project description
aiotruenas
Asyncio-native Python client for the TrueNAS JSON-RPC 2.0 WebSocket API
(ws(s)://<host>/api/current, TrueNAS 25.04+).
No dependency on Home Assistant or any other framework — usable as a standalone library.
Installation
pip install .
Usage
import asyncio
from aiotruenas import TrueNASClient
async def main() -> None:
async with TrueNASClient("truenas.local", "1-abcdef...") as client:
info = await client.call("system.info")
print(info)
asyncio.run(main())
call() is a generic RPC surface — pass any TrueNAS JSON-RPC method name and its params
(list or dict). Long-running operations that return a job id (scrub, replication, dataset
lock/unlock, ...) can be polled automatically with job=True:
await client.call("pool.scrub.scrub", ["tank", "START"], job=True)
Connection and protocol failures are raised as typed exceptions (see aiotruenas.exceptions)
rather than returned as an error code/string, so callers can except TrueNASAuthenticationError,
except TrueNASConnectionError, etc.
Status
Early development (v1: generic call surface only, no typed per-domain convenience methods yet). See PROMPT.md for the full design brief and CLAUDE.md for repo guidance.
License
Apache-2.0, see LICENSE.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiotruenas-1.0.0.tar.gz.
File metadata
- Download URL: aiotruenas-1.0.0.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb685a2867754bb59c7b1bde4be4159a9466835d643d6e8586dc5351e3de7c81
|
|
| MD5 |
1f0712e13924157cee151be1ed7ee83e
|
|
| BLAKE2b-256 |
160764c07bd2a282723c3c61605f0343e12ac7b75a6f55e56efe624e544e7b3a
|
Provenance
The following attestation bundles were made for aiotruenas-1.0.0.tar.gz:
Publisher:
pypi.yaml on kayl-codes/aiotruenas
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiotruenas-1.0.0.tar.gz -
Subject digest:
cb685a2867754bb59c7b1bde4be4159a9466835d643d6e8586dc5351e3de7c81 - Sigstore transparency entry: 2160387680
- Sigstore integration time:
-
Permalink:
kayl-codes/aiotruenas@b259385d6c64e9e60a8bf8a722ce9d52239c7d1c -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/kayl-codes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@b259385d6c64e9e60a8bf8a722ce9d52239c7d1c -
Trigger Event:
release
-
Statement type:
File details
Details for the file aiotruenas-1.0.0-py3-none-any.whl.
File metadata
- Download URL: aiotruenas-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5d4f97ba4165525f7bffb1c4feeaf5ce27affb1f26a78ff6f9e15855f29c758
|
|
| MD5 |
c8a5d8659759303983a7869a8fa4e758
|
|
| BLAKE2b-256 |
53a82665f9124bb62993be6021be48163f11089714f25f73bb7f6d3a777aa83c
|
Provenance
The following attestation bundles were made for aiotruenas-1.0.0-py3-none-any.whl:
Publisher:
pypi.yaml on kayl-codes/aiotruenas
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiotruenas-1.0.0-py3-none-any.whl -
Subject digest:
c5d4f97ba4165525f7bffb1c4feeaf5ce27affb1f26a78ff6f9e15855f29c758 - Sigstore transparency entry: 2160387828
- Sigstore integration time:
-
Permalink:
kayl-codes/aiotruenas@b259385d6c64e9e60a8bf8a722ce9d52239c7d1c -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/kayl-codes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@b259385d6c64e9e60a8bf8a722ce9d52239c7d1c -
Trigger Event:
release
-
Statement type: