Skip to main content

przypominamy

Oficjalny klient API SMS przypominamy.com dla Pythona ≥ 3.9. Zero zależności (standardowa biblioteka).

Polska bramka SMS: jeden endpoint do wysyłki, historia, saldo, własny nadpis, webhooki podpisane HMAC. Pay-as-you-go, bez abonamentu.

pip install przypominamy

Szybki start

import os
from przypominamy import Przypominamy

sms = Przypominamy(os.environ["PRZYPOMINAMY_API_KEY"])  # pk_live_…

msg = sms.send(
    "+48600100200",
    "Przypominamy o wizycie jutro o 10:00.",
    reference="wizyta-4711",          # Twój identyfikator, wraca w webhookach
    idempotency_key="wizyta-4711-1",  # retry nie wyśle SMS-a drugi raz
)
print(msg["id"], msg["status"], msg["cost_grosze"])  # msg_… queued 9

Klucz API dostaniesz po założeniu konta na przypominamy.com/register (weryfikacja w 24 h).

Wysyłka masowa i odroczona

from datetime import datetime, timezone

batch = sms.send(["+48600100200", "+48600100201"], "Promocja -20% do niedzieli. Kod: SMS20", sender="SKLEP")
print(batch["accepted"], "z", batch["count"], "przyjęto, koszt", batch["total_cost_grosze"] / 100, "zł")

sms.send("+48600100200", "Wizyta dziś o 14:00.", send_at=datetime(2026, 9, 18, 8, 0, tzinfo=timezone.utc))

Status, historia, konto

m = sms.get("msg_qY08hZ2mmDXAazdRTytS")
page = sms.list(status="delivered", limit=50)       # page["data"], page["next_cursor"]
for m in sms.iter_messages(reference="wizyta-4711"):  # cała historia, strona po stronie
    print(m["id"], m["status"])
acc = sms.account()                                   # acc["balance_grosze"], acc["price_per_part_grosze"]
print(sms.senders()["data"])
sms.set_sender("ZDROWKO")

Webhooki

secret = sms.set_webhook("https://twojadomena.pl/webhooks/sms")["webhook_secret"]

Handler we Flasku:

from flask import Flask, request, abort
from przypominamy import verify_webhook

app = Flask(__name__)

@app.post("/webhooks/sms")
def sms_webhook():
    try:
        event = verify_webhook(request.get_data(), request.headers.get("X-Przypominamy-Signature"), WEBHOOK_SECRET)
    except ValueError:
        abort(403)
    # event["type"]: message.sent | message.delivered | message.undelivered | message.failed | message.expired
    msg = event["data"]["message"]
    print(event["type"], msg["id"], msg["reference"])
    return "", 200

Błędy

Każdy błąd API to PrzypominamyError z polami status, code (invalid_request, unauthorized, insufficient_funds, rate_limited, idempotency_conflict, provider_error…), param, request_id i retry_after.

from przypominamy import PrzypominamyError
try:
    sms.send("+48600100200", "Hej")
except PrzypominamyError as e:
    if e.code == "rate_limited":
        time.sleep(e.retry_after or 5)

Dokumentacja

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

przypominamy-2.0.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

przypominamy-2.0.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file przypominamy-2.0.0.tar.gz.

File metadata

  • Download URL: przypominamy-2.0.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for przypominamy-2.0.0.tar.gz
Algorithm Hash digest
SHA256 9150c3fed9a14c47085726d3a53b2614b47ffde1550e8b24dafdd7e3329e35a5
MD5 6ee7d57bc53b3cc546a057e7ec5f889d
BLAKE2b-256 072f230337a01375dd029d64b7b79e5a24895e646258d6e864bc4a72897b2bb2

See more details on using hashes here.

File details

Details for the file przypominamy-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: przypominamy-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for przypominamy-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 962bc4cd38fd114493053dc93b188022ce21e22dc9b03ba6693aee60e1c36f1f
MD5 6984a313d88810bad5a0c1e5a1f4fffe
BLAKE2b-256 f9acb7fcbfcc81f9b0bce8287c9d965deaa5dc4c161e2b248e615270c51eb22a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page