skillfed

twilio

Twilio API client and TwiML generator

twilio v9.11.0 20.4M downloads/30d#1,039 on PyPI2,074
Permissive license MIT Active released

What it is and what it does

Twilio is a Python SDK that wraps the Twilio cloud communications API, allowing developers to programmatically send SMS messages, make phone calls, and manage voice and messaging services. It provides a synchronous REST client by default (using requests) and an optional asynchronous client (using aiohttp) for non-blocking operations. The library handles authentication via Account SID and Auth Token, supports region and edge routing for Twilio's global infrastructure, and includes automatic pagination for listing records.

The package is production-stable, actively maintained, and supports Python 3.7 through 3.13. It depends on requests for synchronous HTTP calls, PyJWT for token handling, and aiohttp/aiohttp-retry for async operations. Developers typically use it to integrate SMS notifications, voice calls, or two-factor authentication into web applications and backend services without managing the underlying telephony infrastructure.

Use it for:

  • Send SMS notifications or alerts from a web application or backend service to users' mobile phones.
  • Implement two-factor authentication (2FA) by generating and sending one-time codes via SMS.
  • Programmatically initiate outbound phone calls with custom voice prompts or call routing logic.
  • Build a customer support system that logs and retrieves call and message history via the Twilio API.
  • Create async message queues in high-throughput applications using the AsyncTwilioHttpClient.
  • Route calls to different geographic regions using Twilio's edge and region parameters.

Worth the install?

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

Python client library for the Twilio API that enables sending SMS messages, making calls, and managing voice and messaging services through Twilio's cloud platform.

Yes. Twilio is a mature, actively maintained library with low install friction, no known vulnerabilities, a permissive MIT license, and broad Python version support. Install it if you need to integrate SMS, voice calls, or other Twilio services into a Python application. The only prerequisite is a valid Twilio account and credentials.

Install

twilio on PyPI

pip

pip install twilio

uv

uv add twilio

poetry

poetry add twilio

Installing twilio

Before you install

Low install friction with a pure-Python wheel distribution. Actively maintained with a release 3 days old and recent commits; supports current Python versions (3.10–3.13) and maintains backward compatibility to 3.7.

License in practice

MIT license (permissive) means you can use, modify, and distribute this library freely in commercial and private projects with minimal restrictions.

Quickstart

pip install twilio

from twilio.rest import Client

account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

message = client.messages.create(
    to="+15558675309",
    from_="+15017250604",
    body="Hello from Python!")
print(message.sid)

Requires valid Twilio account credentials (Account SID and Auth Token) from https://console.twilio.com; credentials can be passed directly or via TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN environment variables.

Verify before relying

  • Whether aiohttp and aiohttp-retry are required for all use cases or only for async operations.
  • Performance characteristics and rate-limiting behavior when handling high-volume message or call creation.
  • Specific Twilio API version(s) supported by this release.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7.0)
Install friction low — pure-Python wheel
Runtime dependencies 4 — requests, PyJWT, aiohttp, aiohttp-retry
Maintenance actively maintained — 3 days since the last release
Last repo commit
First released
Downloads 20,413,006/month — #1,039 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: twilio-9.11.0-py2.py3-none-any.whl

Keywords: twilio, twiml

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Communications :: TelephonyTopic :: Software Development :: Libraries :: Python Modules

Tags

twilio sms api clientsend sms pythontwilio voice callstwilio messaging librarypython telephony apitwilio rest clientsms and voice automation
sms-apivoice-communicationsasync-http

More Python Modules packages