Skip to content

Repository files navigation

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

About

A Python Package for communicating with the Courier REST API.

Resources

Contributing

Security policy

Stars

30 stars

Watchers

16 watching

Forks

Releases

Packages

Used by

Contributors

Languages