The official Python library for Calisero is published and ready for production. It covers the whole API — messages, OTP verifications, opt-outs and account details — for any Python application, from a Django project to a scheduled script.
What it includes
Fully typed. Types ship with the package (py.typed) and are checked with mypy --strict. Your editor completes every parameter and every field the API answers with.
No dependencies. The HTTP client is urllib, from the standard library: nothing else to install or audit.
Immutable models. Responses are frozen dataclasses, with the API's own field names.
OTP in two calls. Start a verification, then validate the code the user typed. Calisero generates, sends and checks the code, so your application never stores it.
Delivery webhooks. DeliveryWebhookHandler reads and validates every delivery report and hands it to your code, with ready examples for Flask, Django, FastAPI or any WSGI server. An optional secret token in the callback address turns away requests that do not carry it.
Clear errors. Every kind of failure has its own exception, carrying the API's message and the request's trace ID — the one you debug any request with.
Romania time handled. Pass a timezone-aware datetime to schedule a message and the library converts it to the time zone the API expects.
URL shortening. Turn on link shortening for a message and track the clicks on its links.
Getting started
Install the package straight from GitHub:
pip install "calisero @ git+https://github.com/calisero/[email protected]"
Then send your first message with your API key:
import os
from calisero import SmsClient
client = SmsClient.create(os.environ["CALISERO_API_KEY"])
message = client.messages.create(
recipient="+40742123456",
body="Your order has shipped and arrives tomorrow.",
).data
print(message.id, message.status)
With a sandbox API key you try every call without sending or paying for real messages.
The library needs Python 3.10 or later and is tested on Python 3.10–3.14, on Linux, macOS and Windows. The source code is public on GitHub, with runnable examples for every operation.
Keep your API key on the server: the library is meant for server-side code, never for a browser or a mobile app.
All the official libraries
With Python and Go, the integrations page now lists six official libraries: PHP, Laravel, Symfony, Node.js, Go and Python.