Skip to main content

kalourmade-sailup

Python SDK for the Sailup SMS gateway.

Install

pip install kalourmade-sailup

Requires Python 3.9+. Single dependency: httpx.

Quickstart

import os
from kalourmade_sailup import SailupClient

client = SailupClient(os.environ["SAILUP_API_KEY"])

message = client.sms.send(
    from_="MyBrand",
    to=["233241234567"],
    body="Hello from Sailup",
)

Error handling

from kalourmade_sailup.exceptions import (
    AuthenticationError, ValidationError, RateLimitError, ApiError, NetworkError,
)

try:
    client.sms.send(from_="MyBrand", to=["233241234567"], body="Hi")
except AuthenticationError:
    ...  # invalid/missing API key
except ValidationError:
    ...  # bad request payload
except RateLimitError:
    ...  # back off and retry
except ApiError as e:
    ...  # other API error — e.status_code, e.raw_body
except NetworkError:
    ...  # couldn't reach Sailup

Verifying webhooks

from kalourmade_sailup import Webhooks
from kalourmade_sailup.exceptions import InvalidSignatureError

try:
    event = Webhooks.verify(raw_body, request.headers, os.environ["SAILUP_WEBHOOK_SECRET"])
except InvalidSignatureError:
    return Response(status=400)

Full documentation, runnable examples, and the PHP/Node SDKs: github.com/kalourmade/sailup-sdk.

Download files

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

Source Distribution

kalourmade_sailup-0.1.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

kalourmade_sailup-0.1.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file kalourmade_sailup-0.1.1.tar.gz.

File metadata

  • Download URL: kalourmade_sailup-0.1.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for kalourmade_sailup-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8dee18072e3570c664d29dcd623bbb7a29ddd7a8e672986cf8e32d1fd4827b3f
MD5 ffe290882368a2f786fd32aaf5b9007a
BLAKE2b-256 5dfc348ae8c6be63922dafb27b9c291f94b4bad0d610e06c94f64aa1b88b670b

See more details on using hashes here.

File details

Details for the file kalourmade_sailup-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for kalourmade_sailup-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 09ca78f96a10a4195a6bc1b6d6c94191e5654d1179aceb1c8dd2f7c6c70ff2e4
MD5 9bf981990768eb6a5203a15c1664de68
BLAKE2b-256 f331caa03e33bfc14ae68a9c7fce88d8efac80cc63cfff6602cc3b06fc8d6fa6

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.3

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

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