postmarker


Namepostmarker JSON
Version 1.0 PyPI version JSON
download
home_pagehttps://github.com/Stranger6667/postmarker
SummaryPython client library for Postmark API
upload_time2022-01-15 14:11:24
maintainerDmitry Dygalo
docs_urlNone
authorDmitry Dygalo
requires_python
licenseMIT
keywords postmark api client email
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            Postmarker
==========

|Build| |Coverage| |Version| |Python versions| |Docs| |Chat| |License|

Python client library for `Postmark API <http://developer.postmarkapp.com/developer-api-overview.html>`_.

**Gitter**: https://gitter.im/Stranger6667/postmarker

Installation
============

Postmarker can be obtained with ``pip``::

    $ pip install postmarker

Usage example
=============

**NOTE**:

The attributes of all classes are provided **as is**, without transformation to snake case.
We don't want to introduce new names for existing entities.

Send single email:

.. code-block:: python

    >>> from postmarker.core import PostmarkClient
    >>> postmark = PostmarkClient(server_token='API_TOKEN')
    >>> postmark.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:

.. code-block:: python

    >>> postmark.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:

.. code-block:: python

    >>> email = postmark.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 are a lot of features available. Check it out in our documentation! Here's just a few of them:

- Support for sending Python email instances.
- Bounces, Domains, Messages, Templates, Sender signatures, Status, Stats & Server API.
- Django email backend.
- Tornado helper.
- Spam check API.
- Wrappers for Bounce, Inbound, Open and Delivery webhooks.

Documentation
=============

You can view the documentation online at:

- https://postmarker.readthedocs.io/en/stable/

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

Python support
==============

Postmarker supports CPython 3.6 - 3.10 and PyPy 3.7 & 3.8.

Thanks
======

Many thanks to `Shmele <https://github.com/butorov>`_ and `lobziik <https://github.com/lobziik>`_ for their reviews and advice :)

.. |Build| image:: https://github.com/Stranger6667/postmarker/workflows/build/badge.svg
   :target: https://github.com/Stranger6667/postmarker/actions
.. |Coverage| image:: https://codecov.io/github/Stranger6667/postmarker/coverage.svg?branch=master
    :target: https://codecov.io/github/Stranger6667/postmarker?branch=master
.. |Version| image:: https://img.shields.io/pypi/v/postmarker.svg
   :target: https://pypi.org/project/postmarker/
.. |Python versions| image:: https://img.shields.io/pypi/pyversions/postmarker.svg
   :target: https://pypi.org/project/postmarker/
.. |Docs| image:: https://readthedocs.org/projects/postmarker/badge/?version=stable
   :target: https://postmarker.readthedocs.io/en/stable/
   :alt: Documentation Status
.. |Chat| image:: https://img.shields.io/gitter/room/Stranger6667/postmarker.svg
   :target: https://gitter.im/Stranger6667/postmarker
   :alt: Gitter
.. |License| image:: https://img.shields.io/pypi/l/postmarker.svg
   :target: https://opensource.org/licenses/MIT



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Stranger6667/postmarker",
    "name": "postmarker",
    "maintainer": "Dmitry Dygalo",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "dadygalo@gmail.com",
    "keywords": "postmark,api,client,email",
    "author": "Dmitry Dygalo",
    "author_email": "dadygalo@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/51/79/a527c6e91bc1c6980bc779b83249f59bf1cba8b259147c799934297cc7a8/postmarker-1.0.tar.gz",
    "platform": "",
    "description": "Postmarker\n==========\n\n|Build| |Coverage| |Version| |Python versions| |Docs| |Chat| |License|\n\nPython client library for `Postmark API <http://developer.postmarkapp.com/developer-api-overview.html>`_.\n\n**Gitter**: https://gitter.im/Stranger6667/postmarker\n\nInstallation\n============\n\nPostmarker can be obtained with ``pip``::\n\n    $ pip install postmarker\n\nUsage example\n=============\n\n**NOTE**:\n\nThe attributes of all classes are provided **as is**, without transformation to snake case.\nWe don't want to introduce new names for existing entities.\n\nSend single email:\n\n.. code-block:: python\n\n    >>> from postmarker.core import PostmarkClient\n    >>> postmark = PostmarkClient(server_token='API_TOKEN')\n    >>> postmark.emails.send(\n        From='sender@example.com',\n        To='receiver@example.com',\n        Subject='Postmark test',\n        HtmlBody='<html><body><strong>Hello</strong> dear Postmark user.</body></html>'\n    )\n\nSend batch:\n\n.. code-block:: python\n\n    >>> postmark.emails.send_batch(\n        {\n            'From': 'sender@example.com',\n            'To': 'receiver@example.com',\n            'Subject': 'Postmark test',\n            'HtmlBody': '<html><body><strong>Hello</strong> dear Postmark user.</body></html>',\n        },\n        {\n            'From': 'sender2@example.com',\n            'To': 'receiver2@example.com',\n            'Subject': 'Postmark test 2',\n            'HtmlBody': '<html><body><strong>Hello</strong> dear Postmark user.</body></html>',\n        }\n    )\n\nSetup an email:\n\n.. code-block:: python\n\n    >>> email = postmark.emails.Email(\n        From='sender@example.com',\n        To='receiver@example.com',\n        Subject='Postmark test',\n        HtmlBody='<html><body><strong>Hello</strong> dear Postmark user.</body></html>'\n    )\n    >>> email['X-Accept-Language'] = 'en-us, en'\n    >>> email.attach('/home/user/readme.txt')\n    >>> email.attach_binary(content=b'content', filename='readme.txt')\n    >>> email.send()\n\nThere are a lot of features available. Check it out in our documentation! Here's just a few of them:\n\n- Support for sending Python email instances.\n- Bounces, Domains, Messages, Templates, Sender signatures, Status, Stats & Server API.\n- Django email backend.\n- Tornado helper.\n- Spam check API.\n- Wrappers for Bounce, Inbound, Open and Delivery webhooks.\n\nDocumentation\n=============\n\nYou can view the documentation online at:\n\n- https://postmarker.readthedocs.io/en/stable/\n\nOr you can look at the docs/ directory in the repository.\n\nPython support\n==============\n\nPostmarker supports CPython 3.6 - 3.10 and PyPy 3.7 & 3.8.\n\nThanks\n======\n\nMany thanks to `Shmele <https://github.com/butorov>`_ and `lobziik <https://github.com/lobziik>`_ for their reviews and advice :)\n\n.. |Build| image:: https://github.com/Stranger6667/postmarker/workflows/build/badge.svg\n   :target: https://github.com/Stranger6667/postmarker/actions\n.. |Coverage| image:: https://codecov.io/github/Stranger6667/postmarker/coverage.svg?branch=master\n    :target: https://codecov.io/github/Stranger6667/postmarker?branch=master\n.. |Version| image:: https://img.shields.io/pypi/v/postmarker.svg\n   :target: https://pypi.org/project/postmarker/\n.. |Python versions| image:: https://img.shields.io/pypi/pyversions/postmarker.svg\n   :target: https://pypi.org/project/postmarker/\n.. |Docs| image:: https://readthedocs.org/projects/postmarker/badge/?version=stable\n   :target: https://postmarker.readthedocs.io/en/stable/\n   :alt: Documentation Status\n.. |Chat| image:: https://img.shields.io/gitter/room/Stranger6667/postmarker.svg\n   :target: https://gitter.im/Stranger6667/postmarker\n   :alt: Gitter\n.. |License| image:: https://img.shields.io/pypi/l/postmarker.svg\n   :target: https://opensource.org/licenses/MIT\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python client library for Postmark API",
    "version": "1.0",
    "split_keywords": [
        "postmark",
        "api",
        "client",
        "email"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a14b045369491569fda223d2e0bc821534de14278dd4facdb386405ea17b9d80",
                "md5": "c1806e0477246652cc873f6d9ab2fcb5",
                "sha256": "0fa49f236c7193650896cbf31bbfac34043e352574c6c7e3e2ad2b954704f064"
            },
            "downloads": -1,
            "filename": "postmarker-1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c1806e0477246652cc873f6d9ab2fcb5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 24134,
            "upload_time": "2022-01-15T14:11:22",
            "upload_time_iso_8601": "2022-01-15T14:11:22.732447Z",
            "url": "https://files.pythonhosted.org/packages/a1/4b/045369491569fda223d2e0bc821534de14278dd4facdb386405ea17b9d80/postmarker-1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5179a527c6e91bc1c6980bc779b83249f59bf1cba8b259147c799934297cc7a8",
                "md5": "eb241bdaebb62a203c664d0479a472e5",
                "sha256": "e735303fdf8ede667a1c6e64a95a96e97f0dabbeca726d0ae1f066bdd799fe34"
            },
            "downloads": -1,
            "filename": "postmarker-1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "eb241bdaebb62a203c664d0479a472e5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21627,
            "upload_time": "2022-01-15T14:11:24",
            "upload_time_iso_8601": "2022-01-15T14:11:24.201910Z",
            "url": "https://files.pythonhosted.org/packages/51/79/a527c6e91bc1c6980bc779b83249f59bf1cba8b259147c799934297cc7a8/postmarker-1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-01-15 14:11:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Stranger6667",
    "github_project": "postmarker",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "postmarker"
}
        
Elapsed time: 0.07281s