Skip to main content

anva — Python SDK

Install with pip install "anva[ws]==0.5.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:
        stream.wait_live()  # the viewer's embed is connected
        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.

create_session(speech_input="off") suits hosts that transcribe the user themselves (push-to-talk); say / say_delta / say_done speak lines of your own; lipsync() and connect_lipsync() reach the Enterprise Lipsync API.

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.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anva 0.5.0
File Size Uploaded Provenance
anva-0.5.0.tar.gz 9.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for anva 0.5.0
File Interpreter ABI Platform
anva-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.2 kB

Release files / anva-0.5.0.tar.gz

Download URL anva-0.5.0.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
def8b7b8491b624c327d35bd6312a18a0a56a2ab627113f066fe7cb967a66680
BLAKE2b-256 checksum
How to use checksums
b3736d7cab2bed636c1e074b3ff0c54c3ff8db005b17ec8c41bea04360e275b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / anva-0.5.0-py3-none-any.whl

Download URL anva-0.5.0-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d008e82f1ad3eff9a27d11750e701035f5cbd24ad752ce66f1f65ef2cac82d5
BLAKE2b-256 checksum
How to use checksums
77b0c72aa0fbfbfa8f38f3f4805d806dc662046590e48fb23bd7970a1be9fc4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for anva 0.5.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page