Skip to main content

Python client SDK for Ultravox.

Project description

Ultravox client SDK for Python

Python client SDK for Ultravox.

pypi-v

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 hashes)

Uploaded Source

Built Distribution

ultravox_client-0.0.5-py3-none-any.whl (11.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page