Official Python client for the smsroute.cc SMS API — send SMS to 150+ countries. No third-party dependencies (stdlib only).
pip install smsroutefrom smsroute import SmsRoute
sms = SmsRoute() # reads SMSROUTE_API_KEY from the environment
res = sms.send(
to="+447700900000", # E.164
sender="MyBrand", # alphanumeric sender ID - see country rules below
text="Your code is 123456",
)
print(res)| Method | Purpose |
|---|---|
send(to, text, sender=None) |
send one message |
status(message_id) |
delivery status |
balance() |
account balance |
Errors raise SmsRouteError with .status and .body. Requests time out after 15s.
Alphanumeric sender IDs require pre-registration in many countries and are banned in some. Open dataset of the rules: sms-sender-id-regulations.
- Docs & pricing: https://www.smsroute.cc
- Issues: https://github.com/SMSRoute-cc/smsroute-python/issues
MIT licensed.