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
Metadata
Release files for pingram-python 1.0.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pingram_python-1.0.17.tar.gz | 155.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pingram_python-1.0.17-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 647.5 kB
Release files / pingram_python-1.0.17.tar.gz
| Download URL | pingram_python-1.0.17.tar.gz |
|---|---|
| Size | 155.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
792a7fabb12461034bec0be23fd90cb46157228bda47983ada35747d5d66847d
|
|
BLAKE2b-256 checksum How to use checksums |
74f231dc71fbed9fcb9974f8bf28828518daa997043b80be2b8579ede2f07163
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / pingram_python-1.0.17-py3-none-any.whl
| Download URL | pingram_python-1.0.17-py3-none-any.whl |
|---|---|
| Size | 492.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc4020dd92ba80ed77fef425484289dd0ae353214a45412b5f69744a92266e6f
|
|
BLAKE2b-256 checksum How to use checksums |
077dbe3cc7fec805254485070f854a99a833ef18df015f9143a6965cf400fa6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|