# The official Python library for Calisero is available

- Language: English
- URL: https://calisero.ro/en/developers/knowledge-base/biblioteca-python-disponibila
- Romanian version: https://calisero.ro/developer/knowledge-base/biblioteca-python-disponibila
- Published: 2026-10-24; last updated: 2026-10-24
- Summary: The official Python library for Calisero SMS: fully typed, no dependencies, OTP verifications, opt-outs and delivery webhooks for Flask, Django and FastAPI.

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](https://calisero.ro/en/developers/knowledge-base/depanare-cu-trace-id) 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:

```bash
pip install "calisero @ git+https://github.com/calisero/calisero-pyton.git@1.0.0"
```

Then send your first message with your API key:

```python
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](https://calisero.ro/en/developers/knowledge-base/manual-sandbox) 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](https://github.com/calisero/calisero-pyton), 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](https://calisero.ro/en/developers/knowledge-base/biblioteca-go-disponibila), the [integrations page](https://calisero.ro/en/developers/integrations) now lists six official libraries: PHP, Laravel, Symfony, Node.js, Go and Python.
