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.3.tar.gz
(7.6 kB
view hashes)
Built Distribution
Close
Hashes for ultravox_client-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a65aabd4378182c72a9aed22cc0c8290858bb202b8d35d33f7c2455e9099c81f |
|
MD5 | 2f32ed38a2cc49b314d527e9a3f849b8 |
|
BLAKE2b-256 | 8bf8fa0a613594b4720294444cc0867372a29557f6dccd055e66f148ef3dae23 |