Skip to main content

A Python library to parse German eBon (digital receipt) PDFs. Currently supports REWE/Thalia receipts.

Project description

🧾 eBonsParser

eBonsParser is a modular Python library for parsing digital receipt PDFs (eBons) used in Germany.
It extracts structured data such as store details, purchase date, payment method, and a full itemized list.

🛒 Currently supports REWE and Thalia receipts — built to extend to other German retailers (e.g., Lidl, Edeka, Aldi).


🚀 Features

  • 📄 Parse eBon PDFs directly (from path or memory)
  • 🛒 Extract store, date, total, payment type, and itemized product data
  • 💶 Handle price, weight, unit, and tax class
  • 🧱 Structured output using Pydantic models (easy to convert to JSON)

📦 Installation

You can install the package using pip:

pip install eBonsParser

🧠 Usage

from eBonsParser.stores import Rewe,Thalia 

pdf_file_path = "path/to/your/ebon.pdf"

rewe = Rewe()
thalia = Thalia()

receipt = rewe.parse_ebon(pdf_file_path)
receipt = thalia.parse_ebon(pdf_file_path)

print(receipt.model_dump_json(indent=4))

This will return a structured Receipt object like:

{
    "ebonNr": 1617,
    "store": {
        "name": "REWE Markt GmbH",
        "type": "supermarket",
        "UID": "DE812706034",
        "address": {
            "street": "Pontdriesch 10-12",
            "city": "Aachen",
            "zip": 52062
        },
        "phone": "0241 1684258"
    },
    "date": "2025-05-06",
    "total": 6.85,
    "payment_method": {
        "method": "card",
        "card": null
    },
    "items": [
        {
            "name": "TARTETEIG",
            "price": 1.89,
            "tax_class": 0.07
        },
        ...
    ]
}

🙌 Contributing

Want to help improve eBonsParser?

Whether it's fixing bugs, adding support for more retailers, or improving documentation — your contributions are welcome!

Please read our CONTRIBUTING.md

📜 License

This project is licensed under the MIT License. For details see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ebonsparser-0.1.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ebonsparser-0.1.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file ebonsparser-0.1.1.tar.gz.

File metadata

  • Download URL: ebonsparser-0.1.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ebonsparser-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d343a1e2562eb37549358c0a0193be44fa4a4ef583a303a1c6ae7c1283e73366
MD5 0540873765e4db0544bb78048d09efd3
BLAKE2b-256 87b93e99cff0528205da5556e02d98d23d3d598216085d94f5129993f1c7cd8e

See more details on using hashes here.

File details

Details for the file ebonsparser-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ebonsparser-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ebonsparser-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1e5e411161b1785a1ca81375090b6a5d8d59399a37489c26ee1c4a60bedf211
MD5 abf3f79fcd25cedc1aab624942663917
BLAKE2b-256 35bfc25646717a404c35f6162fb01f3a2327e6f0383ac6b2afdea937745ec641

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page