Python SDK
notifly-py — the official, fully typed Python SDK covering the full Notifly REST surface, sync and async.
notifly-py is the official Python SDK for the Notifly API. It is generated from the platform's OpenAPI spec, covers the full REST surface (131 operations), and is fully typed (py.typed) with both sync and async call styles on httpx.
Install
pip install notifly-pyRequires Python 3.11+.
Authentication
Notifly authenticates with your environment's secret key via the Authorization: ApiKey <secret_key> header:
from notifly_py import AuthenticatedClient
client = AuthenticatedClient(
base_url="https://api.notifly.io",
token="<NOTIFLY_SECRET_KEY>",
prefix="ApiKey",
)prefix="ApiKey" is required — the default Bearer prefix is for JWT sessions, not API keys.
Trigger a workflow
from notifly_py.api.events import events_controller_trigger
from notifly_py.models import TriggerEventRequestDto, TriggerEventRequestDtoPayload
payload = TriggerEventRequestDtoPayload()
payload.additional_properties = {"body": "Hello from Python!"}
with client as client:
result = events_controller_trigger.sync(
client=client,
body=TriggerEventRequestDto(
name="my-workflow", # workflow identifier
to="subscriber-id", # or SubscriberPayloadDto / TopicPayloadDto / list of them
payload=payload,
),
)Or async:
async with client as client:
result = await events_controller_trigger.asyncio(client=client, body=...)API structure
Endpoints live under notifly_py.api.<tag>, one module per operation. Each module exposes four call styles:
| Function | Behavior |
|---|---|
sync | blocking, returns the parsed body (or None) |
sync_detailed | blocking, returns Response (status code, headers, parsed body) |
asyncio | async, returns the parsed body |
asyncio_detailed | async, returns Response |
Available tags: audit_logs, channel_connections, channel_endpoints, contexts, environment_variables, environments, events, integrations, layouts, messages, notifications, subscribers, topics, workflows. All request/response models are in notifly_py.models.
Client options
Both Client and AuthenticatedClient accept:
timeout— anhttpx.Timeoutverify_ssl— path to a CA bundle, orFalse(not recommended)headers/cookies— extra values sent with every requestraise_on_unexpected_status— raise on undocumented status codes (recommended:True)
The SDK is MIT-licensed and generated from the Notifly OpenAPI spec; releases publish to PyPI via GitHub Actions Trusted Publishing.