Python SMS libraries

Updated Nov 2026

Python SMS libraries send text messages through a communications provider's API from Python code. A provider SDK authenticates with account credentials and submits each message as an API request. These libraries let apps send verification codes, alerts, and appointment reminders to phones.

Popularity

Twilio has the most monthly downloads in this comparison, at 25.8M, a count that includes its non-SMS APIs.

LibraryMonthly downloadsStarsLast releaseLicense
Twilio
25.8M
2.1KNov 2026MIT
telesign
1.3M
25Oct 2026MIT
telesignenterprise
1.3M
4Jul 2026MIT
Telnyx
1.2M
186Nov 2026MIT
Knock
1.0M
16Oct 2026Apache-2.0
RingCentral
931.3K
58Jun 2025MIT
Brevo
434.8K
36Oct 2026MIT
Plivo
394.6K
69Sep 2026MIT
Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Features compared

LibraryAsync requestsHTTP retry controlsOutbound voice API
TwilioBuilt-inBuilt-inBuilt-in
telesignUnsupportedUnsupportedBuilt-in
telesignenterpriseUnsupportedUnsupportedBuilt-in
TelnyxBuilt-inBuilt-inBuilt-in
KnockBuilt-inBuilt-inUnsupported
RingCentralUnsupportedUnsupportedBuilt-in
BrevoBuilt-inBuilt-inUnsupported
PlivoUnsupportedUnsupportedBuilt-in
Built-inNot supported

Libraries and code examples

Provides Python clients for sending SMS through the Twilio API.

Downloads / mo
25.8M
Stars
2.1K
Last release
9.13.0
License
MIT

Strengths

  • Supports nonblocking API requests. Use AsyncTwilioHttpClient and async methods to avoid blocking the caller.
  • Checks incoming webhook signatures. Use RequestValidator.validate with the callback URL, request data, and signature.

Limitations

  • Synchronous requests are the default. Select the async HTTP client for nonblocking API requests.
  • Retry policy needs configuration. Pass max_retries to TwilioHttpClient to configure request retries.

Quickstart

From README.md
$ python -m pip install twilio==9.13.0
from twilio.rest import Client

# Your Account SID and Auth Token from console.twilio.com
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)

Provides the Telesign SDK.

Downloads / mo
1.3M
Stars
25
Last release
4.1.1
License
MIT

Quickstart

From messaging.py
$ python -m pip install telesign==4.1.1
import os
from telesign.messaging import MessagingClient
client = MessagingClient(os.environ["TELESIGN_CUSTOMER_ID"], os.environ["TELESIGN_API_KEY"])
response = client.message(os.environ["SMS_TO"], "Hello", "ARN")
print(response.status_code)

telesignenterprise

Provides the Telesign Enterprise SDK.

Downloads / mo
1.3M
Stars
4
Last release
4.1.0
License
MIT

Quickstart

From README.md
$ python -m pip install telesignenterprise==4.1.0 telesign==4.1.1
import os
from telesignenterprise.messaging import MessagingClient
client = MessagingClient(os.environ["TELESIGN_CUSTOMER_ID"], os.environ["TELESIGN_API_KEY"])
response = client.omniMessage({"phone_number": os.environ["SMS_TO"], "message_type": "ARN", "message": {"sms": {"template": "text", "parameters": {"text": "Hello"}}}, "channels": [{"channel": "sms", "fallback_time": 300}]})
print(response.status_code)

Provides synchronous and asynchronous Python clients for the Telnyx messaging API.

Downloads / mo
1.2M
Stars
186
Last release
4.191.0
License
MIT

Strengths

  • Supports sync and async clients. Use AsyncTelnyx when message requests must be awaited.
  • Configures automatic request retries. Set max_retries globally or override it for an individual request.

Limitations

  • Retries extend timeout failures. Timeouts are retried unless max_retries disables them.
  • Webhook checks need raw bytes. Verify the unchanged request body before parsing its JSON.

Quickstart

From messages.py
$ python -m pip install telnyx==4.191.0
import os
from telnyx import Telnyx
client = Telnyx(api_key=os.environ["TELNYX_API_KEY"])
message = client.messages.send(from_=os.environ["SMS_FROM"], to=os.environ["SMS_TO"], text="Hello")
print(message.data)

Calls the Knock API.

Downloads / mo
1.0M
Stars
16
Last release
1.33.0
License
Apache-2.0

Quickstart

From README.md
$ python -m pip install knockapi==1.33.0
import os
from knockapi import Knock
client = Knock(api_key=os.environ["KNOCK_API_KEY"])
run = client.workflows.trigger(key=os.environ["KNOCK_SMS_WORKFLOW_KEY"], recipients=[os.environ["KNOCK_SMS_RECIPIENT_ID"]], data={"message": "Hello"})
print(run.workflow_run_id)

RingCentral

Provides the RingCentral SDK.

Downloads / mo
931.3K
Stars
58
Last release
0.9.2
License
MIT

Quickstart

From README.md
$ python -m pip install ringcentral==0.9.2
import os
from ringcentral import SDK
platform = SDK(os.environ["RC_CLIENT_ID"], os.environ["RC_CLIENT_SECRET"], "https://platform.ringcentral.com").platform()
platform.login(jwt=os.environ["RC_USER_JWT"])
response = platform.post("/restapi/v1.0/account/~/extension/~/sms", {"from": {"phoneNumber": os.environ["SMS_FROM"]}, "to": [{"phoneNumber": os.environ["SMS_TO"]}], "text": "Hello"})
print(response.json())

Calls the Brevo API.

Downloads / mo
434.8K
Stars
36
Last release
5.1.0
License
MIT

Quickstart

From client.py
$ python -m pip install brevo-python==5.1.0
import os
from brevo import Brevo
client = Brevo(api_key=os.environ["BREVO_API_KEY"])
response = client.transactional_sms.send_transac_sms(recipient=os.environ["SMS_TO"], sender=os.environ["SMS_SENDER"], content="Hello")
print(response)

Provides a REST client for sending SMS and managing messaging resources.

Downloads / mo
394.6K
Stars
69
Last release
4.63.0
License
MIT

Strengths

  • Handles resource pagination. Iterate resources to retrieve later pages automatically.
  • Supports scoped client cleanup. Use RestClient as a context manager for a short-lived client.

Limitations

  • List calls return one page. Set limit and offset, or iterate resources, to retrieve later pages.

Quickstart

From README.md
$ python -m pip install plivo==4.63.0
import plivo

client = plivo.RestClient()
message_created = client.messages.create(
    src='the_source_number',
    dst='the_destination_number',
    text='Hello, world!'
)

Plivo examples

From open-source projects on GitHub

FAQ

Twilio suits apps that send SMS and MMS and also use voice. Telnyx suits code that wants synchronous and asynchronous clients with typed requests. Knock suits apps that send SMS as one channel of a notification workflow.

A provider SDK such as Twilio or Plivo sends a message through an API call that names the sender, the recipient, and the text.

Twilio's Python package is its API client and TwiML generator, with message resources for SMS and MMS.

Telnyx is the official Python library for the Telnyx API, with synchronous and asynchronous interfaces for sending and scheduling messages.

For coding agents

Found your SMS library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official