Skip to main content

Postmark Flask extension

Project description

Flask Postmark

Build Coverage Version Python versions Documentation Status License

This is a simple integration with Postmark for Flask applications.

Installation

Installing is simple with pip:

$ pip install flask-postmark

Usage

To send an email in your Flask application:

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"

Documentation

You can view the documentation online at:

Or you can look at the docs/ directory in the repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Flask-Postmark-0.3.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

Flask_Postmark-0.3.1-py2.py3-none-any.whl (3.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file Flask-Postmark-0.3.1.tar.gz.

File metadata

  • Download URL: Flask-Postmark-0.3.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for Flask-Postmark-0.3.1.tar.gz
Algorithm Hash digest
SHA256 a9b124ffb7e64c2ea838abc6857ff3acd783d574da9a4203f3d82a6c877d1b72
MD5 e4f6fe0ecd01561f2a3e8c8dd5c6eabd
BLAKE2b-256 1a345395aabc418a28dd19ad835f31ad7c736d7683514befd44ab3944189f31c

See more details on using hashes here.

Provenance

File details

Details for the file Flask_Postmark-0.3.1-py2.py3-none-any.whl.

File metadata

  • Download URL: Flask_Postmark-0.3.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for Flask_Postmark-0.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 57c4527d6022c9c44e96d83c29704b65dd156d5d62e925490276e7584c3f98a7
MD5 81c4be04bbf1532f502cb171bf301b41
BLAKE2b-256 c857281e866ddc1104bef73574445f379ca7f4ee2306314ac39cfa0f823bab23

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page