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.2.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.

kalourmade_sailup-0.1.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kalourmade_sailup-0.1.2.tar.gz
  • Upload date:
  • Size: 6.3 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.2.tar.gz
Algorithm Hash digest
SHA256 dc1ffd6faeddb732ad90b01d239c9a61a5b2c0df41fd13aae1769d9725c23782
MD5 bc7fe84707a41a3d3677ac05412c513c
BLAKE2b-256 3f951412092b3593100df69be0d2164fbcc8a337fc7a901e74757d406d7df021

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kalourmade_sailup-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a6923c1e354274d6df602d67148d0f570fe26e122a3706a6614d286fcfe19e67
MD5 44eb85cbed931aff9854c66e86ec14d8
BLAKE2b-256 3f698a7a508ecac55648dbdb9a6048cd76fb4c78cafe769e0d03bfa493eeba9c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.3

2 files

This release

0.1.2 This release

2 files

0.1.1

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