anva — Python SDK
Install with pip install "anva[ws]==0.4.0".
The REST client uses the standard library. Realtime uses websockets' sync API.
import os
from anva import Anva, AnvaError
client = Anva(os.environ["ANVA_KEY"])
capabilities = client.capabilities()
session = client.create_session(
preset_id="YOUR_PRESET_ID", service_mode="byo_llm")
# Attach session["embed_url"] in your browser.
try:
with client.connect(session["session_id"]) as stream:
for event in stream:
if event["type"] == "turn.request":
turn_id = event["payload"]["turn_id"]
# Replace the immediate sample with your cancellable LLM worker.
stream.turn_delta(turn_id, "Hello from your application.")
stream.turn_done(turn_id)
finally:
client.end_session(session["session_id"])
Use one reader per connection; perform slow LLM work in a separate cancellable
worker so it can react to turn.cancel. send_message is user input, not
verbatim assistant speech. AnvaError includes status, code, message,
and details. Realtime command failures remain structured events.
All five service modes are supported as request values, subject to deployment
capabilities. PCM methods accept bytes, bytearray or byte-oriented memoryview:
24kHz signed16 little-endian mono, maximum 24,000 bytes per chunk. Read the
repository README for sample offsets, backpressure and real playback requirements.
Metadata
Release files for anva 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| anva-0.4.0.tar.gz | 7.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anva-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.5 kB
Release files / anva-0.4.0.tar.gz
| Download URL | anva-0.4.0.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe6ef45d579d01684e1ddbc82b13548031807097947b97f333d1cff29c87d2e2
|
|
BLAKE2b-256 checksum How to use checksums |
f99c9beae468849e9776b90f63903590b10fce9506e584b94407ed48a6f2be72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / anva-0.4.0-py3-none-any.whl
| Download URL | anva-0.4.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a130dc8d28e555a8bc3201298f8443a00f5cedf7a44d3ec96132fe492a54431
|
|
BLAKE2b-256 checksum How to use checksums |
0c2edf1b0ab2743c824406a0e1cc1d65d92915e7480bad13c7da1a550de0abce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for anva 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.