Python client SDK for Ultravox.
Project description
Ultravox client SDK for Python
Python client SDK for Ultravox.
Getting started
pip install ultravox-client
Usage
import asyncio
import signal
import ultravox_client as uv
session = uv.UltravoxSession()
done = asyncio.Event()
@session.on("status")
def on_status():
if session.status == uv.UltravoxSessionStatus.DISCONNECTED:
done.set()
await session.join_call(os.getenv("JOIN_URL", None))
loop = asyncio.get_running_loop()
loop.add_signal_handler(signal.SIGINT, lambda: done.set())
loop.add_signal_handler(signal.SIGTERM, lambda: done.set())
await done.wait()
await session.leave_call()
See the included example app for a more complete example. To get a joinUrl
, you'll want to integrate your server with the Ultravox REST API.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ultravox_client-0.0.5.tar.gz
(9.8 kB
view details)
Built Distribution
File details
Details for the file ultravox_client-0.0.5.tar.gz
.
File metadata
- Download URL: ultravox_client-0.0.5.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.9.3-76060903-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb201afa9a124f83fc45424a37f2f64b1ebfd039b80eecda9b69f19377b46a9c |
|
MD5 | d9eed22ffe597e6ee19fadb07db62567 |
|
BLAKE2b-256 | 089d34495b20e669f226870273b930755b5c3cf21b85752211414cea23a24866 |
File details
Details for the file ultravox_client-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: ultravox_client-0.0.5-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.9.3-76060903-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 941c9a29a6a7c73a92fca123fff359aace8ceb2fa38019774acb7da2875e0a26 |
|
MD5 | 2ff8fff441d821229f68b55c5190909e |
|
BLAKE2b-256 | f9bfed36175d90d4901a84d7fad8199ce2a65cabe709977344a7b7f720d54d09 |