1
0
Fork
You've already forked python-inema
1
A Python Library for the Deutsche Post Internetmarke API (online franking). Backup location of: https://gitea.sysmocom.de/odoo/python-inema
Python 99.6%
Makefile 0.4%
Find a file
2026年01月02日 23:51:06 +01:00
doc polish sphinx documentation and integrate readthedocs 2025年09月28日 00:33:08 +02:00
examples update products to 2025年01月01日 Deutsche Post product list 2025年01月12日 13:59:31 +01:00
inema report server errors, also with soapfree 2026年01月02日 23:46:21 +01:00
.gitignore initial import of code 2016年07月14日 01:32:12 +02:00
.readthedocs.yaml fix dependencies 2025年09月28日 01:57:36 +02:00
conftest.py Add Deutsche Post Internetmarke REST API support 2025年09月21日 19:15:56 +02:00
LICENSE re-license under (more permissive) LGPLv3+ 2023年01月01日 21:30:58 +01:00
Makefile initial import of code 2016年07月14日 01:32:12 +02:00
MANIFEST.in include test suites in source distribution 2025年10月02日 17:04:23 +02:00
pyproject.toml prepare release 1.0.4 2026年01月02日 23:51:06 +01:00
README-pypi.rst add shorter and simplified long description for pypi 2025年10月02日 18:11:28 +02:00
README.rst link to homepages instead of emails 2025年09月28日 01:39:43 +02:00
test_local.py fix missing import 2026年01月02日 23:01:08 +01:00
test_openapi.py remove superfluous bang-line and executable bits 2026年01月02日 23:02:51 +01:00
test_rest.py remove superfluous bang-line and executable bits 2026年01月02日 23:02:51 +01:00
test_schema.py remove superfluous bang-line and executable bits 2026年01月02日 23:02:51 +01:00

inema Documentation Status

inema PyPI Project

LGPL-3.0-or-later

python-inema

python-inema is a Python package that implements the "Internetmarke" web API for interacing with HTTP endpoints of the German postal company Deutsche Post, in order to buy printable letter postage, online.

The Internetmarke web API is offered by Deutsche Post and allows you to buy online franking for national and international postal products like post cards and letters of all weight classes and service classes (normal, registered, ...).

Supported APIs:

  • Internetmarke REST API (released 2024), cf. inema.rest
  • Internetmarke SOAP API (V3, aka 1C4A Webservice API), end of life end of 2025, cf. inema.inema
  • Product Webservice SOAP API (ProdWS), cf. inema.inema.ProductInformation
  • Warenpost International REST API (released 2020), cf. inema.wpint

Note

As of 2025, AFAICS, Deutsche Post publishes only the documentation of it's server-side web APIs, i.e. it does not publish client libraries for any programming language.

API Credentials

As of 2025, Deutsche Post offers access to its APIs only to business customers. That means to use it you either have to have some kind of registered business ('Gewerbe') or self-employment ('selbständige Erwerbstätigkeit').

The registration workflow differs between the various APIs:

Warning

FWIW, Deutsche Post refers its private customers to its online shop that doesn't provide any API access.

Portokasse

Futhermore, for actually purchasing postage via the API, you need a special wallet: a 'Portokasse'.

That means you need to register separately a Portokasse account and link it to your API account.

Note

The Portokasse web portal username/password credentials are the same that are required for an Internet API session. That means the Portokasse doesn't have a concept API keys or similar.

See also:

  • Internetmarke Overview Section in the Deutsche Post API documentation for general Portokasse integration notes
  • Internetmarke Portokasse Section in the Deutsche Post API documentation that describes how to get a special Portokasse for testing purposes ('Entwickler-Portokasse').

Tip

A Entwickler-Portokasse is recommended for first steps and especially so for running the test_rest.py test suite that is port of the python-inema repository.

Internetmarke API SOAP Migration

See the inema.soapfree module for comments and hints.

Sources

The python-inema source code is available from the following official locations:

Authors / History

In 2016, Harald Welte started developing python-inema for internal use at his company sysmocom, in order to provide franking from the Odoo based logistics system. Like most other software at sysmocom, it was released as open source software under a strong network copyleft license.

Shortly after the initial release, Georg Sauthoff joined the development and improved and extended the code im various ways. He also added the command-line frank.py. In 2025 he added support for the new Internetmarke REST API.

License

The python-inema software package is licensed under the LGPL-3.0-or-later license.