This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

pyPostal is an Interface for sending real (paper-based) letters via an API.

There are several providers which offer printing, envelope stuffing and posting services but currently only https://www.pixelletter.de/ provides such services to SME without contractual hassles and the like.

This interface only supports mailing PDFs which have the Address Placed in the PDF at the DIN 5008 Address Location.

You can download it at the Python PAckage Index (PyPI).

High-Level Usage

Usage is very easy: Just set up your credentials in the Environment before starting Python:

export PYPOSTAL_PIXELLETTER_CRED='your@email.com:PASSWORD'

Then call pypostal.send_post_pixelletter() with the open PDF files or PDF datatream to send and the country code of the recipient:

>>> import pypostal
>>> pypostal.send_post_pixelletter(
        [open('/Users/md/Desktop/Testbrief.pdf').read()], 'DE')

If you prefer to hardcode credentials you can provide them via a function call instead via the environment:

>>> pypostal.send_post_pixelletter([open('Testbrief.pdf')], 'DE',
                                   username='your@email.com',
                                   password='PASSWORD')

Pixelletter Interface

Pixelletter offers a Bunch of Documentation and a PHP Library. Unfortunately there is no specification of the HTTP-API and the documentation seems also somewhat incomplete and outdated. Also it seems that Pixelletter uses no prebuild XML processing and parsing pipeline but build one arround print statements. This library was build by using trial and error and reverse engeneering the website.

Example Usage

The Pixelletter interface is straightforward:

# Log in
>>> from pypostal import Pixelletter
>>> pix = Pixelletter('your_email', 'your_password', test_mode=True)

# Show how many Cents Pixelletter owes you.
>>> print pix.get_account_info()['customer_credit']
1995

# Send two PDFs from your Desktop as en Letter
>>> print pix.sendPost([open('/Users/md/Desktop/Testbrief.pdf'),
                        open('/Users/md/Desktop/Thesis.pdf')])

# Send one PDF printet in color and in CO2 neutral fashion.
>>> print pix.sendPost([open('/Users/md/Desktop/Testbrief.pdf').read()],
                       guid='0815-4711', service=['green', 'color'])

You can provide a GUID (“Transaction Identifier” in the Pixelletter Documenttion) - this might support a Track and Trace Interface but I havn’t seen any documentation on this. Something like https://www.pixelletter.de/de/auftraege.php as an Atom Feed vertainly would be nice.

The Python library currently supports following services:

  • green (default, use service=[] to disable)
  • einschreiben (see DHL / Deutsche Post AG on the differences)
  • einschreibeneinwurf
  • eigenhaendig
  • eigenhaendigrueckschein
  • rueckschein
  • color

The Pixelletter API also seems to support “Nachnahme”, “Postident Comfort” and “Ueberweisungsvordruck” but they are undocumented and currently not supported by this library.

Sipgate.de Fax Interface

Sipgate.de offers a hot and new REST API with some documentation. Pypostal provides functionality to send PDFs via Fax.

Example Usage

A nice and clean interface:

# Log in
>>> from pypostal.sipgate import Sipgate
>>> sip = Sipgate('your_email', 'your_password')

# Send a PDF via Fax
>>> sip.sendFax([open('/Users/md/Desktop/Testbrief.pdf')], 'sender_number', ['dest_number'])

Planned other Interfaces

We want to support

  • Pixelletter Fax interface
  • Pawisda L-Vin Post / Pinbriefportal SOAP Interface
Release History

Release History

1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1d

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1c

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1b

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0p3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0p2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0p1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyPostal-1.1.tar.gz (6.7 kB) Copy SHA256 Checksum SHA256 Source Oct 19, 2010

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