Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
|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
Postmarker can be obtained with pip
::
$ pip install postmarker
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:
You can view the documentation online at:
Or you can look at the docs/ directory in the repository.
Postmarker supports CPython 3.6 - 3.10 and PyPy 3.7 & 3.8.
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
FAQs
Python client library for Postmark API
We found that postmarker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.