Flask-Postmark
Postmark integration for Flask, built on Postmarker.
Installation
pip install flask-postmark
Usage
from flask import Flask
from flask_postmark import Postmark
app = Flask(__name__)
app.config["POSTMARK_SERVER_TOKEN"] = "<replace with your server token>"
postmark = Postmark(app)
@app.route("/send", methods=["POST"])
def send():
postmark.send(
From="sender@example.com",
To="receiver@example.com",
Subject="Postmark test",
HtmlBody="<html><body><strong>Hello</strong> dear Postmark user.</body></html>",
)
return b"OK"
With the application factory pattern, create the extension once and bind it later with postmark.init_app(app).
postmark.send and postmark.send_batch wrap client.emails.send and client.emails.send_batch.
For the rest of the Postmark API, use postmark.client: a postmarker.core.PostmarkClient created once per application context and closed when the context ends.
Using it outside an application context raises RuntimeError.
Configuration
Each POSTMARK_* key in app.config is passed to the matching PostmarkClient argument:
| Key | PostmarkClient argument |
|---|---|
POSTMARK_SERVER_TOKEN |
server_token |
POSTMARK_ACCOUNT_TOKEN |
account_token |
POSTMARK_VERBOSITY |
verbosity |
POSTMARK_MAX_RETRIES |
max_retries |
POSTMARK_TIMEOUT |
timeout |
POSTMARK_LOGS_STREAM |
logs_stream |
POSTMARK_ROOT_API_URL |
root_api_url |
POSTMARK_INLINE_CSS |
inline_css (needs the postmarker[css-inline] extra) |
At least one of POSTMARK_SERVER_TOKEN and POSTMARK_ACCOUNT_TOKEN is required.
See the Postmarker documentation for what each argument does.
Metadata
Release files for Flask-Postmark 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| flask_postmark-1.0.0.tar.gz | 5.3 kB | With provenance | Details for flask_postmark-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flask_postmark-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for flask_postmark-1.0.0-py3-none-any.whl |
Total release size: 9.6 kB
Release files / flask_postmark-1.0.0.tar.gz
| Download URL | flask_postmark-1.0.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9d1baca7e0f05ad17f4474deab38c92f353d4a4f13c7a814b15b83fa2e8ef4d
|
|
BLAKE2b-256 checksum How to use checksums |
79058f73843fdbd860022eb471b6071cbacef5d9284528ca115e2e1f39471496
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 20, 2026.
Transparency logRelease files / flask_postmark-1.0.0-py3-none-any.whl
| Download URL | flask_postmark-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
666adf20d9af14334372197a50035f89ba00d5d736112c3d22f17ed2eb94836e
|
|
BLAKE2b-256 checksum How to use checksums |
b35536d787263e70ee39ae23556b90a57d777c779c2e5897c0abb925c648ec1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 20, 2026.
Transparency logSecurity for Flask-Postmark 1.0.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for flask_postmark-1.0.0.tar.gz
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 Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.