Courier Python SDK
The Courier Python SDK provides typed access to the Courier REST API from Python applications. Use it to send notifications, manage user profiles, check message status, issue JWT tokens for client-side SDKs, and more.
Installation
pip install trycourier
Requires Python 3.8+.
Quick Start
import os
from courier import Courier
client = Courier(
api_key=os.environ.get("COURIER_API_KEY"), # the default, can be omitted
)
response = client.send.message(
message={
"to": {"user_id": "your_user_id"},
"template": "your_template_id",
"data": {"foo": "bar"},
},
)
print(response.request_id)
The client reads COURIER_API_KEY from your environment automatically.
An async client is also available as AsyncCourier, with the same methods.
Documentation
Full documentation: courier.com/docs/sdk-libraries/python
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 trycourier-8.0.0.tar.gz.
File metadata
- Download URL: trycourier-8.0.0.tar.gz
- Upload date:
- Size: 259.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/5.1.1 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2bfb0ffde15e0591460b333ddb502a9f9af3fef6da0f163e472e351c4ed97d1
|
|
| MD5 |
2ac77204adee98fb024e7cae5247e097
|
|
| BLAKE2b-256 |
aed2ef82e852d750779b9286bc164fc3ea885957ddf2e98e0533d0bad8997c06
|
File details
Details for the file trycourier-8.0.0-py3-none-any.whl.
File metadata
- Download URL: trycourier-8.0.0-py3-none-any.whl
- Upload date:
- Size: 408.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/5.1.1 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43adae2d536ec458c4ed9dd2c33d1aefc27526637478905c0ea32fd56ba2325d
|
|
| MD5 |
4f7d88ed333101e858719e76471a678e
|
|
| BLAKE2b-256 |
c4ee646b76443d0a59d087b3bbbb14dc7879a7f8532cc31f39f5fe08a5dfc348
|