inema.soapfree module

Compatibility wrapper that translates Internermarke SOAP API calls to REST ones.

Use case: You have existing software that interfaces with the Deutsche Post Internetmarke SOAP API via the inema.inema.Internetmarke class, you need to upgrade to the new Deutsche Post Internetmarke REST API (because the SOAP endpoints are announced to be turned off at the end of 2025) and you want to change your existing software as little as possible.

In the best case you just need to register for the new REST API, link your Portokasse in Deutsche Post Web UI, update your credentials configuration and adjust your import like this:

from inema import Internetmarke

to something like this:

from inema.soapfree import Internetmarke

See also frank.py in the python-inema repository (around 2025-09-21) for a real world example.

Of course, depending on your existing usage, directly migrating to the new REST API via inema.rest likely isn’t that complicated, either.

class inema.soapfree.Internetmarke(partner_id, key, key_phase='1', products=None)[source]

Bases: object

add_position(position)[source]
authenticate(username, password)[source]
build_addr(street, house, zipcode, city, country, additional=None)[source]
build_comp_addr(company, address, person=None)[source]
build_pers_addr(first, last, address, salutation=None, title=None)[source]
build_position(product, sender=None, receiver=None, layout='AddressZone', pdf=False, x=1, y=1, page=1)[source]
checkoutPDF(page_format)[source]
checkoutPNG(page_format)[source]
clear_positions()[source]
compute_total()[source]
get_product_price_by_id(ext_prod_id)[source]
retrievePNGs(link)[source]
retrievePageFormats()[source]
retrievePreviewPDF(prod_code, page_format, layout='AddressZone')[source]
retrievePreviewPNG(prod_code, layout='AddressZone')[source]
inema.soapfree.translate_layout(layout)[source]