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()
state = await session.join_call(os.getenv("JOIN_URL", None))
done = asyncio.Event()
loop = asyncio.get_running_loop()

@state.on("status")
def on_status():
    if state.status == uv.UltravoxSessionStatus.DISCONNECTED:
        done.set()

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.2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

ultravox_client-0.0.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file ultravox_client-0.0.2.tar.gz.

File metadata

  • Download URL: ultravox_client-0.0.2.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.9.3-76060903-generic

File hashes

Hashes for ultravox_client-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7a9e305171e9b87f11af3c30b7b006732d1aee6f3f59c5d3a372e6d80183b6db
MD5 b8a74a94948b568d864ed341fbd349d0
BLAKE2b-256 fa0338e410e956118f11c01bf2cbcc809e30b4efe69a7270d342985d793f756b

See more details on using hashes here.

File details

Details for the file ultravox_client-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ultravox_client-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.9.3-76060903-generic

File hashes

Hashes for ultravox_client-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b7461bc90b676bb22dbdd248df89fb19bbe8f868e4b84abd19840b9139614658
MD5 3e2922b6ca75175931f73c77a7ddbeef
BLAKE2b-256 065bdaf99e52c23aace5e634d6b11733b05ea778b0283e56192893c99444f174

See more details on using hashes here.

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