# Python SMS libraries

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

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [Twilio](#twilio) | 25.8M | 2.1K | Nov 2026 | MIT |
| [telesign](#telesign) | 1.3M | 25 | Oct 2026 | MIT |
| [telesignenterprise](#telesignenterprise) | 1.3M | 4 | Jul 2026 | MIT |
| [Telnyx](#telnyx) | 1.2M | 186 | Nov 2026 | MIT |
| [Knock](#knockapi) | 1.0M | 16 | Oct 2026 | Apache-2.0 |
| [RingCentral](#ringcentral) | 931.3K | 58 | Jun 2025 | MIT |
| [Brevo](#brevo-python) | 434.8K | 36 | Oct 2026 | MIT |
| [Plivo](#plivo) | 394.6K | 69 | Sep 2026 | MIT |

Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[Twilio](#twilio) has the most monthly downloads in this comparison, at 25.8M, a count that includes its non-SMS APIs.

## Capabilities

| Library | Async requests | HTTP retry controls | Outbound voice API |
| --- | --- | --- | --- |
| [Twilio](#twilio) | Yes | Yes | Yes |
| [telesign](#telesign) | No | No | Yes |
| [telesignenterprise](#telesignenterprise) | No | No | Yes |
| [Telnyx](#telnyx) | Yes | Yes | Yes |
| [Knock](#knockapi) | Yes | Yes | No |
| [RingCentral](#ringcentral) | No | No | Yes |
| [Brevo](#brevo-python) | Yes | Yes | No |
| [Plivo](#plivo) | No | No | Yes |

## Libraries

### Twilio

[GitHub](https://github.com/twilio/twilio-python) · [PyPI](https://pypi.org/project/twilio) · [Docs](https://api.github.com/repos/twilio/twilio-python/readme)

Provides Python clients for sending SMS through the Twilio API.

- Downloads / mo: 25.8M
- Stars: 2.1K
- Last release: 9.13.0
- License: MIT
- Capabilities: [From the Twilio docs](https://api.github.com/repos/twilio/twilio-python/readme)

**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.

**Watch out for**

- **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.

```sh
python -m pip install twilio==9.13.0
```

**Quickstart**

```python
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)

```

From [README.md](https://api.github.com/repos/twilio/twilio-python/readme) · [Find projects using Twilio →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20twilio%20for%20SMS%20notifications&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

### telesign

[GitHub](https://github.com/TeleSign/python_telesign) · [PyPI](https://pypi.org/project/telesign) · [Docs](https://api.github.com/repos/telesign/python_telesign/readme)

Provides the Telesign SDK.

- Downloads / mo: 1.3M
- Stars: 25
- Last release: 4.1.1
- License: MIT
- Capabilities: [From the telesign docs](https://api.github.com/repos/telesign/python_telesign/readme)

```sh
python -m pip install telesign==4.1.1
```

**Quickstart**

```python
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)

```

From [messaging.py](https://api.github.com/repos/telesign/python_telesign/contents/telesign/messaging.py) · [Find projects using telesign →](https://dashboard.exa.ai/playground/search?q=telesign%20GitHub%20projects)

### telesignenterprise

[GitHub](https://github.com/TeleSign/python_telesign_enterprise) · [PyPI](https://pypi.org/project/telesignenterprise) · [Docs](https://api.github.com/repos/telesign/python_telesign_enterprise/readme)

Provides the Telesign Enterprise SDK.

- Downloads / mo: 1.3M
- Stars: 4
- Last release: 4.1.0
- License: MIT
- Capabilities: [From the telesignenterprise docs](https://api.github.com/repos/telesign/python_telesign_enterprise/readme)

```sh
python -m pip install telesignenterprise==4.1.0 telesign==4.1.1
```

**Quickstart**

```python
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)

```

From [README.md](https://api.github.com/repos/telesign/python_telesign_enterprise/contents/examples/messaging/1_send_omni_message.py) · [Find projects using telesignenterprise →](https://dashboard.exa.ai/playground/search?q=telesignenterprise%20GitHub%20projects)

### Telnyx

[GitHub](https://github.com/team-telnyx/telnyx-python) · [PyPI](https://pypi.org/project/telnyx) · [Docs](https://api.github.com/repos/team-telnyx/telnyx-python/readme)

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

- Downloads / mo: 1.2M
- Stars: 186
- Last release: 4.191.0
- License: MIT
- Capabilities: [From the Telnyx docs](https://api.github.com/repos/team-telnyx/telnyx-python/readme)

**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.

**Watch out for**

- **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.

```sh
python -m pip install telnyx==4.191.0
```

**Quickstart**

```python
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)

```

From [messages.py](https://api.github.com/repos/team-telnyx/telnyx-python/contents/src/telnyx/resources/messages/messages.py) · [Find projects using Telnyx →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20telnyx%20for%20SMS%20notifications&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

### Knock

[GitHub](https://github.com/knocklabs/knock-python) · [PyPI](https://pypi.org/project/knockapi) · [Docs](https://api.github.com/repos/knocklabs/knock-python/readme)

Calls the Knock API.

- Downloads / mo: 1.0M
- Stars: 16
- Last release: 1.33.0
- License: Apache-2.0
- Capabilities: [From the Knock docs](https://api.github.com/repos/knocklabs/knock-python/readme)

```sh
python -m pip install knockapi==1.33.0
```

**Quickstart**

```python
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)

```

From [README.md](https://api.github.com/repos/knocklabs/knock-python/readme) · [Find projects using Knock →](https://dashboard.exa.ai/playground/search?q=knockapi%20GitHub%20projects)

### RingCentral

[GitHub](https://github.com/ringcentral/ringcentral-python) · [PyPI](https://pypi.org/project/ringcentral) · [Docs](https://api.github.com/repos/ringcentral/ringcentral-python/readme)

Provides the RingCentral SDK.

- Downloads / mo: 931.3K
- Stars: 58
- Last release: 0.9.2
- License: MIT
- Capabilities: [From the RingCentral docs](https://api.github.com/repos/ringcentral/ringcentral-python/readme)

```sh
python -m pip install ringcentral==0.9.2
```

**Quickstart**

```python
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())

```

From [README.md](https://api.github.com/repos/ringcentral/ringcentral-python/readme) · [Find projects using RingCentral →](https://dashboard.exa.ai/playground/search?q=ringcentral%20GitHub%20projects)

### Brevo

[GitHub](https://github.com/getbrevo/brevo-python) · [PyPI](https://pypi.org/project/brevo-python) · [Docs](https://api.github.com/repos/getbrevo/brevo-python/readme)

Calls the Brevo API.

- Downloads / mo: 434.8K
- Stars: 36
- Last release: 5.1.0
- License: MIT
- Capabilities: [From the Brevo docs](https://api.github.com/repos/getbrevo/brevo-python/readme)

```sh
python -m pip install brevo-python==5.1.0
```

**Quickstart**

```python
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)

```

From [client.py](https://api.github.com/repos/getbrevo/brevo-python/contents/src/brevo/transactional_sms/client.py) · [Find projects using Brevo →](https://dashboard.exa.ai/playground/search?q=brevo-python%20GitHub%20projects)

### Plivo

[GitHub](https://github.com/plivo/plivo-python) · [PyPI](https://pypi.org/project/plivo) · [Docs](https://api.github.com/repos/plivo/plivo-python/readme)

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

- Downloads / mo: 394.6K
- Stars: 69
- Last release: 4.63.0
- License: MIT
- Capabilities: [From the Plivo docs](https://api.github.com/repos/plivo/plivo-python/readme)

**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.

**Watch out for**

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

```sh
python -m pip install plivo==4.63.0
```

**agno-agi/agno** (43.2K stars)

[agno-agi/agno](https://github.com/agno-agi/agno) 

```python
def send_sms(self, to: str, from_: str, body: str) -> str:
    """
    Send an SMS message using Plivo.

    Args:
        to: Recipient phone number (E.164 format). Single recipient only.
        from_: Sender ID — a Plivo number, short code, or alphanumeric sender ID
        body: Message content

    Returns:
        str: Message UUID if successful, error message if failed
    """
    try:
        if not self.validate_phone_number(to):
            return "Error: 'to' number must be in E.164 format (e.g., +1234567890)"
        if not from_ or len(from_.strip()) == 0:
            return "Error: Sender ID (from_) cannot be empty"
        if not body or len(body.strip()) == 0:
            return "Error: Message body cannot be empty"

        response = self.client.messages.create(src=from_, dst=to, text=body)
        message_uuid = response.message_uuid[0] if getattr(response, "message_uuid", None) else "unknown"
        log_info(f"SMS sent. UUID: {message_uuid}, to: {to}")
        return f"Message sent successfully. UUID: {message_uuid}"
    except PlivoRestError as e:
        log_error(f"Failed to send SMS to {to}")
        return f"Error sending message: {str(e)}"

```

[libs/agno/agno/tools/plivo.py](https://github.com/agno-agi/agno/blob/11d144107895933cc6dc668eb520f7b850595d06/libs/agno/agno/tools/plivo.py#L84-L110) · [More projects using Plivo →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20plivo%20for%20SMS%20notifications&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import plivo

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


```

From [README.md](https://api.github.com/repos/plivo/plivo-python/readme)

## FAQ

### Which Python SMS library should I use?

[Twilio](#twilio) suits apps that send SMS and MMS and also use voice. [Telnyx](#telnyx) suits code that wants synchronous and asynchronous clients with typed requests. [Knock](#knockapi) suits apps that send SMS as one channel of a notification workflow.

### How do I send an SMS with Python?

A provider SDK such as [Twilio](#twilio) or [Plivo](#plivo) sends a message through an API call that names the sender, the recipient, and the text.

### What is the Twilio Python library?

[Twilio](#twilio)'s Python package is its API client and TwiML generator, with message resources for SMS and MMS.

### What is Telnyx?

[Telnyx](#telnyx) is the official Python library for the Telnyx API, with synchronous and asynchronous interfaces for sending and scheduling messages.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best Python SMS libraries Twilio Vonage Plivo Telnyx code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
