Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python client library for Postmark API

Project Description

Postmarker

Python client library for Postmark API.

This library is in active development now. Contributions are very welcome!

Installation

Postmarker can be obtained with pip:

$ pip install postmarker

Example usage

Send single email:

>>> from postmarker.core import ServerClient
>>> server_client = ServerClient(token='API_TOKEN')
>>> server_client.emails.send(
    From='sender@example.com',
    To='receiver@example.com',
    Subject='Postmark test',
    HtmlBody='<html><body><strong>Hello</strong> dear Postmark user.</body></html>'
)

Send batch:

>>> server_client.emails.send_batch(
    {
        From='sender@example.com',
        To='receiver@example.com',
        Subject='Postmark test',
        HtmlBody='<html><body><strong>Hello</strong> dear Postmark user.</body></html>',
    },
    {
        From='sender2@example.com',
        To='receiver2@example.com',
        Subject='Postmark test 2',
        HtmlBody='<html><body><strong>Hello</strong> dear Postmark user.</body></html>',
    }
)

Setup an email:

>>> email = server_client.emails.Email(
    From='sender@example.com',
    To='receiver@example.com',
    Subject='Postmark test',
    HtmlBody='<html><body><strong>Hello</strong> dear Postmark user.</body></html>'
)
>>> email['X-Accept-Language'] = 'en-us, en'
>>> email.attach('/home/user/readme.txt')
>>> email.attach_binary(content=b'content', filename='readme.txt')
>>> email.send()

There a lot of features available. Check it out in our documentation! Just a few of them:

  • Support for sending Python email instances.
  • Bounces & Server API.
  • Django email backend.

Documentation

You can view documentation online at:

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

Python support

Postmarker supports Python 2.6, 2.7, 3.3+ and PyPy and PyPy3.

Thanks

Big thanks to Shmele and lobziik for their reviews and advices :)

Release History

Release History

History Node

0.11.3

History Node

0.11.2

History Node

0.11.1

History Node

0.11.0

History Node

0.10.1

History Node

0.10.0

History Node

0.9.2

History Node

0.9.1

History Node

0.9.0

History Node

0.8.1

History Node

0.8.0

History Node

0.7.2

History Node

0.7.1

History Node

0.7.0

History Node

0.6.2

History Node

0.6.1

History Node

0.6.0

History Node

0.5.3

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

History Node

0.4.0

This version
History Node

0.3.1

History Node

0.3.0

History Node

0.2.0

History Node

0.1.1

History Node

0.1.0

History Node

0.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
postmarker-0.3.1-py2.py3-none-any.whl (11.0 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Oct 8, 2016
postmarker-0.3.1.tar.gz (8.5 kB) Copy SHA256 Checksum SHA256 Source Oct 8, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting