smpplib
SMPP library for python
What it is and what it does
smpplib is a Python SMPP (Short Message Peer-to-Peer) protocol client that enables applications to send and receive SMS messages through an SMPP gateway. It handles the low-level protocol details—PDU encoding/decoding, connection management, and message sequencing—so you can focus on application logic. The library supports multi-part messages with automatic splitting, multiple character encodings (including UCS2 for non-Latin scripts), delivery receipts, and bidirectional message handling via callback handlers.
You instantiate a client with a gateway hostname and port, authenticate with credentials, then send messages by specifying source and destination phone numbers, message content, and encoding flags. The library can listen for incoming messages either synchronously (blocking) or in a background thread, automatically managing keep-alive signals to the SMPP server. It also allows custom sequence number generation for persistence across application restarts.
Use it for:
- Send transactional SMS notifications (alerts, confirmations, OTPs) from a Python application to an SMPP gateway.
- Build a two-way SMS application that receives and responds to incoming messages via SMPP.
- Handle multi-part SMS with automatic splitting and character encoding for international text.
- Integrate SMS delivery tracking by processing delivery receipts from the SMPP server.
- Implement a persistent sequence number generator to maintain message tracking across application restarts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
SMPP protocol client library for sending and receiving SMS messages over SMPP connections, with support for multi-part messages, character encoding, and delivery receipts.
Yes, if you need to integrate SMPP-based SMS into a Python application and have access to an SMPP gateway. The library is stable (Production/Stable classifier), has low install friction, and carries no known vulnerabilities. The dormant maintenance is a minor concern—no releases in 574 days—but the recent repository activity and broad Python version support suggest it remains functional. LGPLv3 copyleft licensing is a consideration if you plan to redistribute modified versions.
Install
smpplib on PyPI
pip
pip install smpplibuv
uv add smpplibpoetry
poetry add smpplibInstalling smpplib
Before you install
Low install friction with a single lightweight dependency (six). Maintenance is dormant—no releases in 574 days—but the repository remains active with a recent commit on 2025-01-17 and 189 stars, suggesting the codebase is stable rather than abandoned.
License in practice
Licensed under LGPLv3 (copyleft). You may use and modify the library freely, but any modifications must be released under the same license, and the library itself must remain open-source in derivative works.
Quickstart
import smpplib.client
import smpplib.consts
client = smpplib.client.Client('example.com', SOMEPORTNUMBER)
client.connect()
client.bind_transceiver(system_id='login', password='secret')
pdu = client.send_message(
source_addr='SENDER',
destination_addr='PHONENUMBER',
short_message=b'Hello',
source_addr_ton=smpplib.consts.SMPP_TON_INTL,
dest_addr_ton=smpplib.consts.SMPP_TON_INTL
)
client.listen()
Requires an SMPP server endpoint (hostname and port) to connect to; credentials (system_id and password) must be valid for the target SMPP service.
Verify before relying
- Whether the dormant maintenance status poses a risk for future Python or SMPP protocol compatibility.
- Whether six dependency will remain maintained as Python 2 support is phased out industry-wide.
Package facts
| License | not declared (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — six |
| Maintenance | dormant — 574 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 74,827/month — #14,787 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: smpplib-2.2.4-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
azure-communication-smsSends SMS messages through Azure Communication…
permissive · top 15,000 on PyPI
zulipPython client library for sending and receiving…
permissive · top 15,000 on PyPI
clx-sdk-xmsPython SDK for the CLX Communications REST API…
permissive · top 15,000 on PyPI
ringcentralPython SDK for accessing RingCentral's cloud…
unclear · top 15,000 on PyPI
sendgridSends emails and SMS messages via the Twilio…
permissive · top 1,000 on PyPI
vonageVonage provides a unified Python interface to…
permissive · top 15,000 on PyPI
smsapi-clientA Python client library for sending SMS…
permissive · top 15,000 on PyPI
vonage-smsSends SMS messages via Vonage's API and handles…
permissive · top 15,000 on PyPI
telesignTeleSign SDK provides Python bindings to send…
permissive · top 15,000 on PyPI
vonage-messagesProvides Python message models and client…
permissive · top 15,000 on PyPI