skillfed

telnyx

The official Python library for the telnyx API

telnyx v4.173.0 720.5K downloads/30d#5,236 on PyPI185
Permissive license MIT Active released

What it is and what it does

Telnyx is the official Python SDK for the Telnyx communications platform REST API. It wraps HTTP calls to Telnyx's endpoints with a typed, object-oriented interface, supporting both synchronous and asynchronous workflows. The library is generated using Stainless and includes full type hints for all request parameters and response fields, enabling IDE autocomplete and static type checking.

The package is built on httpx for HTTP transport and pydantic for response validation. It handles pagination automatically, provides helper methods for serializing responses to JSON or dictionaries, and includes error classes for connection and API status failures. Async usage is identical to sync except for await keywords; you can optionally swap httpx for aiohttp as the HTTP backend for improved concurrency performance.

Use it for:

  • Programmatically dial phone calls, manage connections, and configure answering machine detection in voice applications.
  • Build IVR systems or contact center integrations that need to interact with Telnyx's telephony platform.
  • Transcribe audio files or access AI-powered communication features via the Telnyx API.
  • Manage phone numbers, access IP addresses, and handle number orders through the REST API.
  • Integrate Telnyx webhooks and event handling into async Python applications with type safety.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Python client library for the Telnyx REST API, offering both synchronous and asynchronous interfaces with full type definitions for requests and responses.

Yes. The library is actively maintained, has no known vulnerabilities, uses permissive MIT licensing, and offers low install friction. It is the official Telnyx SDK with full type support and both sync/async interfaces—the right choice for any Python application integrating Telnyx communications services.

Install

telnyx on PyPI

pip

pip install telnyx

uv

uv add telnyx

poetry

poetry add telnyx

Installing telnyx

Before you install

Low install friction with a pure-Python wheel and six common dependencies (anyio, distro, httpx, pydantic, sniffio, typing-extensions). Actively maintained with a release 2 days old and recent commits.

License in practice

MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this library freely provided you include the license notice.

Quickstart

pip install telnyx

import os
from telnyx import Telnyx

client = Telnyx(api_key=os.environ.get("TELNYX_API_KEY"))
response = client.calls.dial(
    connection_id="conn12345",
    from_="+15557654321",
    to="+15551234567",
    webhook_url="https://your-webhook.url/events",
)
print(response.data)

Requires Python 3.9 or later; TELNYX_API_KEY environment variable or explicit api_key parameter needed to authenticate.

Verify before relying

  • Whether the library's auto-pagination handles all edge cases and rate-limiting scenarios reliably.
  • Performance characteristics when handling large concurrent requests with the async client.
  • Completeness of type coverage across all Telnyx API endpoints and response schemas.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 6 — anyio, distro, httpx, pydantic, sniffio, typing-extensions
Maintenance actively maintained — 2 days since the last release
Last repo commit
First released
Downloads 720,461/month — #5,236 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: telnyx-4.173.0-py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

telnyx api clientpython telephony sdkvoice call api libraryasync http clientrest api wrappertyped api clientcommunications platform sdk
communications-apiasync-readytyped

More Python Modules packages