Skip to main content

Official Python SDK for startupAid — send email & push, schedule social posts, and convert currency.

Project description

startupaid

Official Python SDK for startupAid — send transactional email, send push, schedule social posts, and convert currency, all with your account API key. Pure standard library, no dependencies.

Install

pip install startupaid

Requires Python 3.9+.

Quick start

from startupaid import Client

sa = Client("sk_your_key")

res = sa.convert("USD", "NGN", 100)
print(f"100 USD = {res['result']} NGN")

Create an API key in your startupAid dashboard → API Keys.

Usage

Email

msg = sa.send_email(
    from_="Acme <hi@acme.com>",
    to="user@example.com",
    subject="Welcome",
    body="<h1>Hi 👋</h1>",
)
status = sa.get_message(msg["id"])

Currency

sa.convert("USD", "EUR", 250)
sa.rates("USD")
sa.currencies()

Push

sa.send_push(
    "app_id",
    target={"userRef": "u_123"},
    title="Your order shipped",
    body="Track it in the app.",
)

Social

channels = sa.list_channels()

post = sa.schedule_post(
    channels=[c["id"] for c in channels],
    content="We just shipped 🚀",
    # scheduled_for="2026-08-01T09:00:00Z"  # omit to publish now
)

sa.list_posts()

Audiences

sa.list_audiences()
sa.add_contact("audience_id", email="new@example.com", first_name="Ada")

Configuration

Client(
    "sk_your_key",
    base_url="http://localhost:8080",  # self-host / testing
    timeout=30.0,                       # per-request timeout (seconds)
)

Errors

Non-2xx responses raise StartupAidError with the status code and message:

from startupaid import StartupAidError

try:
    sa.convert("USD", "NGN", 1)
except StartupAidError as err:
    print(err.status, err.message)

Each method requires your account to be subscribed to the matching product (email, currency, push, social); otherwise the API returns an upgrade prompt.

License

MIT

Project details


Download files

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

Source Distribution

startupaid-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

startupaid-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file startupaid-0.1.0.tar.gz.

File metadata

  • Download URL: startupaid-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for startupaid-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2d1bb209170fb4dbc56913fb4fa2bbc30d5284ddbf41d641a45af25510c5e710
MD5 91a5d5711816e419fcf8172f2f531363
BLAKE2b-256 e2426c11a587c76a4e2d85125729bfa7cb59d4b417471e79d777d7f5922a4b69

See more details on using hashes here.

File details

Details for the file startupaid-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: startupaid-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for startupaid-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fa8b277dfb24aaeb7e3ab03e1f7661e221612b07d2d96620bdd576c6de29e21
MD5 b0194f18dc88f2cc771e11b196f1b208
BLAKE2b-256 d4f75a85bbfe948f7aa0d6537263c260f5a07db88cff94e1243a8146ff8a799e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page