Official Python SDK for Pingram - Send notifications via Email, SMS, Push, In-App, and more
Project description
Pingram Python SDK
Official Python SDK for Pingram. Send notifications via Email, SMS, Push, In-App, and more from your server-side Python code.
Requirements
- Python 3.9+
- Dependencies:
httpx,pydantic,python-dateutil,typing-extensions(installed automatically)
Installation
pip install pingram-python
To install from source (e.g. from the GitHub repo):
pip install -e sdks/python
Quick start
Use the Pingram client with your API key, then call send() or the namespaced APIs (user, users, logs, etc.).
import asyncio
from pingram import Pingram, SenderPostBody, SenderPostBodyTo
async def main():
# API key (e.g. pingram_sk_...) or JWT; optional region ("us" | "eu" | "ca")
async with Pingram(api_key="pingram_sk_...") as client:
# Send a notification
body = SenderPostBody(
notification_id="your_notification_id",
to=SenderPostBodyTo(id="user_123"),
)
response = await client.send(sender_post_body=body)
print(response)
# Or use namespaced APIs (same as Node: client.user, client.users, client.logs, ...)
# user = await client.user.user_get_user(account_id="...", user_id="...")
# logs = await client.logs.logs_query_logs(...)
asyncio.run(main())
You can also pass a config dict: Pingram({"api_key": "pingram_sk_...", "region": "eu"}). For full API coverage, use client.send, client.user, client.users, client.logs, client.templates, client.environments, and the other APIs.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pingram_python-1.0.5.tar.gz.
File metadata
- Download URL: pingram_python-1.0.5.tar.gz
- Upload date:
- Size: 115.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13315cc140e991a7a0cd413ea743f403dca8d32630c2909e852272e9f8b26f67
|
|
| MD5 |
f5eabd93151f0cbca46ddb85e13cf79c
|
|
| BLAKE2b-256 |
53a65279c923c3c91fe41d62e29cdb0037b9cc9337604685d42d66d55124cb4a
|
File details
Details for the file pingram_python-1.0.5-py3-none-any.whl.
File metadata
- Download URL: pingram_python-1.0.5-py3-none-any.whl
- Upload date:
- Size: 345.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e78046de41c7b7e38fde1bbdf3bf9ac828d8da8fe006e2e58b4c10aac5f0c96
|
|
| MD5 |
8ea911cdc80ee48640b96d98b0b45cc2
|
|
| BLAKE2b-256 |
ad672a23bf9ea359bfc6a6b8279673ff3fd5ee1f0a7c12493ae1bf7238fefc91
|