Skip to main content
Postmark Inbound Hook [![Build Status](https://travis-ci.org/jpadilla/postmark-inbound-python.png?branch=master)](https://travis-ci.org/jpadilla/postmark-inbound-python)
=====================

This is a simple API wrapper for [Postmark Inbound Hook](http://developer.postmarkapp.com/developer-inbound.html)
in Python inspired by [jjaffeux](https://github.com/jjaffeux/postmark-inbound-php).

## Install

Using Github:

```
git clone git@github.com:jpadilla/postmark-inbound-python.git
```

Using pip:

```
pip install python-postmark-inbound
```

Using easy_install:

```
easy_install python-postmark-inbound
```


Usage
-----

``` python
from postmark_inbound import PostmarkInbound


# load json
json_data = open('./tests/fixtures/valid_http_post.json').read()
inbound = PostmarkInbound(json=json_data)

# content
inbound.subject()
inbound.sender()
inbound.to()
inbound.bcc()
inbound.tag()
inbound.message_id()
inbound.mailbox_hash()
inbound.reply_to()
inbound.html_body()
inbound.text_body()
inbound.send_date()

# headers
inbound.headers() # default to get Date
inbound.headers('MIME-Version')
inbound.headers('Received-SPF')

# spam
inbound.headers('X-Spam-Checker-Version')
inbound.headers('X-Spam-Score')
inbound.headers('X-Spam-Tests')
inbound.headers('X-Spam-Status')

# attachments
inbound.has_attachments() # boolean
attachments = inbound.attachments()

first_attachment = attachments[0]
first_attachment.name()

second_attachment = attachments[1]
second_attachment.content_length()

for a in attachments:
a.name()
a.content_type()
a.content_length()
a.download('./tests/', ['image/png'], '10000')

# raw data
inbound.json
inbound.source
```

Bug tracker
-----------

Have a bug? Please create an issue here on GitHub!


Contributions
-------------

* Fork
* Write tests
* Write Code
* Pull request

Thanks for your help.


TODO
----

* Write more tests


Authors
-------

**José Padilla**

+ http://twitter.com/jpadilla_
+ http://github.com/jpadilla

Inspiration
-----------

Thanks to [jjaffeux](https://github.com/jjaffeux/) for the original PHP wrapper

+ https://github.com/jjaffeux
+ https://github.com/jjaffeux/postmark-inbound-php


Other libraries
---------------

+ Ruby: https://github.com/r38y/postmark-mitt
+ PHP: https://github.com/jjaffeux/postmark-inbound-php
+ Node.js + CouchDB: https://gist.github.com/1647808

License
---------------------

MIT License

Metadata

Release files for python-postmark-inbound 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-postmark-inbound 1.1.0
File Size Uploaded Provenance Actions
python-postmark-inbound-1.1.0.tar.gz 4.3 kB Without provenance Details for python-postmark-inbound-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-postmark-inbound 1.1.0
File Interpreter ABI Platform Actions
python_postmark_inbound-1.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for python_postmark_inbound-1.1.0-py2.py3-none-any.whl

Total release size: 8.0 kB

Release files / python-postmark-inbound-1.1.0.tar.gz

Download URL python-postmark-inbound-1.1.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
72686a67235f19d4c88d39bd459809cf20cd74f6d8ed7d013fb920e4d089e41c
BLAKE2b-256 checksum
How to use checksums
1594f188be1f951ce0ca0aeefe748d28b91ae7bf8661d1b2dac638d8e7b04d9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / python_postmark_inbound-1.1.0-py2.py3-none-any.whl

Download URL python_postmark_inbound-1.1.0-py2.py3-none-any.whl
Size 3.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fdf2585238dc8d5da91e7a0dfb30b0856e55519f5828fb0ceea53582c634635e
BLAKE2b-256 checksum
How to use checksums
fe7e8f84c2343cdfdd3b6f23fd16cce837e31504386444b5fab9271662525489
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for python-postmark-inbound 1.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page