FastAPI Plugin Notification
A notification plugin for FastAPI that integrates with FastAPI SDK and Postmark provider to send notifications via email and store them in a database.
Features
- 📧 Email Notifications: Send notifications via Postmark email provider
- 💾 Database Storage: Store notifications in MongoDB using ODMantic
- 🔐 User Ownership: Automatic ownership filtering based on user claims
- 📊 Notification Management:
- Get all notifications for a user
- Mark notifications as seen/acknowledged
- Get unseen notification count
- 🗞️ Digests: Daily or weekly digest emails, grouped by category
- 🚀 FastAPI Integration: Full CRUD API endpoints with authentication
- 📦 PyPI Package: Easy to install and use in any FastAPI project
Installation
Using UV:
uv add fastapi-plugin-notification
Or using pip:
pip install fastapi-plugin-notification
At a Glance
from fastapi_provider_postmark import PostmarkProvider
from fastapi_plugin_notification import NotificationClient
notification_client = NotificationClient(
postmark_provider=PostmarkProvider(...),
default_template_id=123456,
)
notification = await notification_client.send_notification(
db_engine=db,
name="welcome",
user_id="user_123",
user_email="user@example.com",
claims=request.state.claims,
link="https://example.com/dashboard",
link_name="Go to Dashboard",
)
Full setup — client, router and dependencies — is in the Quick Start.
Documentation
| Guide | Contents |
|---|---|
| Quick Start | Initialize the client, mount the router, send your first notification |
| Usage Examples | Storing, sending, listing and acknowledging notifications |
| Notification Digests | Daily/weekly digests, category grouping, example payload, Postmark Mustachio templates |
| API Endpoints | HTTP routes with request parameters and response bodies |
| Model Structure | Fields on NotificationModel |
| Ownership and Permissions | Claim-based ownership and required permissions |
| Configuration | Router options, template variables, error handling |
| Development | Local setup and running the tests |
License
MIT License - see LICENSE file for details
Metadata
Release files for fastapi-plugin-notification 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fastapi_plugin_notification-0.2.0.tar.gz | 16.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fastapi_plugin_notification-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.7 kB
Release files / fastapi_plugin_notification-0.2.0.tar.gz
| Download URL | fastapi_plugin_notification-0.2.0.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ed974775c2644233e56c3d2b7848d29bcbb66fffea9bbfe4f93f46111aa13d3
|
|
BLAKE2b-256 checksum How to use checksums |
457a8a3a74a880e7d2727a92735b50563468a7a182def9733554e9675d5c9a76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.
Transparency logRelease files / fastapi_plugin_notification-0.2.0-py3-none-any.whl
| Download URL | fastapi_plugin_notification-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf42806f887ac56fc2de2503146f438bf903ecf02945b02b4ba9c56d5d204d89
|
|
BLAKE2b-256 checksum How to use checksums |
9dad35bf609719c5858ad9c05ccc3e9911ec3a910ed2810b9929180fa0306813
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.
Transparency log