A unified parsing library for Israeli digital grocery and retail receipts
Project description
israeli-invoice-parser
A unified, highly accurate Python parsing library for Israeli digital receipts, grocery bills, and commercial retail invoices. This library standardizes fragmented vendor payloads (including direct APIs, raw HTML, and complex Nuxt transport matrices) into a single, clean, structured Python dictionary.
Supported Retailers and Providers
The library supports major Israeli storefronts directly or via central receipt infrastructure aggregators:
- Rami Levy (רמי לוי) — Native support for standard digital bills and microservice data streams.
- Weezmo / Wee.ai Infrastructure — Multi-brand validation supporting grocery gateways like Yohananof (יוחננוף), high-street retail setups, and fashion entities (TopTen, Tamnun).
- Pairzon Engine (פיירזון) — Dynamic resolution for short-link token routers and partner store layouts (e.g., Osher Ad (אושר עד), Max Stock (מקס סטוק), etc.).
Current Limitations: Automated extraction for Shufersal (שופרסל) invoices is currently blocked. The endpoint uses robust bot-protection / WAF rules that reject standard programmatic requests. We are actively trying to figure out how to bypass or properly emulate browser signatures to restore this functionality. Contributions or ideas on this technical issue are highly appreciated!
Installation
Install the package via pip:
pip install israel-invoice-parser
Quick Start and Usage Examples
Every parser inherits from a common interface (BaseReceiptParser) and returns a standardized data model, making it simple to process invoices interchangeably.
1. Parsing a Rami Levy URL
from israeli_invoice_parser import RamiLevyParser
# Initialize the dedicated parser
parser = RamiLevyParser()
# Pass a live receipt or invoice URL directly
url = "https://api-digi.rami-levy.co.il/api/v1/receipts/example-token-12345"
receipt = parser.parse(url)
# Access standardized fields uniformly
print(f"Store: {receipt['store_name']}")
print(f"Total Paid: ₪{receipt['total_paid']}")
print(f"Date: {receipt['date']} at {receipt['time']}")
for item in receipt['items']:
print(f" - {item['description']}: ₪{item['final_price']} (Qty: {item['quantity_or_weight']})")
2. Parsing a Weezmo / Wee.ai Provider Short-Link (e.g., Yohananof)
from israeli_invoice_parser import WeezmoParser
parser = WeezmoParser()
# Works with central wee.ai tracking tokens or short links
weezmo_url = "https://wee.ai/r/v123abcd"
receipt = parser.parse(weezmo_url)
# The parser dynamically extracts real corporate metadata to identify the sub-brand
print(f"Identified Brand: {receipt['store_name']}") # e.g., 'יוחננוף'
print(f"Legal Business ID: {receipt['company_legal_id']}")
3. Standardized Output Format Matrix
Regardless of which vendor parser is called, the output dictionary always complies with the following layout structure:
{
"store_name": "רמי לוי",
"company_legal_id": "513770669",
"branch_name": "סניף תל אביב",
"store_address": "דרך מנחם בגין 123",
"store_phone": "03-1234567",
"customer_name": "ישראל ישראלי",
"date": "23/06/2026",
"time": "14:30:00",
"receipt_id": "987654321",
"total_paid": 245.50,
"vat_rate": 17.0,
"total_vat_paid": 35.67,
"payment_method": "אשראי",
"items": [
{
"description": "חלב תנובה 3%",
"barcode": "7290000042431",
"is_by_weight": False,
"quantity_or_weight": 2.0,
"unit_price": 6.50,
"original_total_price": 13.00,
"is_part_of_deal": True,
"deal_text": "2 ב-₪11",
"discount_amount": 2.00,
"final_price": 11.00,
"category_path": ["סופרמרקט"]
}
]
}
Contributing and Helping Out
Parsing real-world digital invoices is a game of cat-and-mouse as retailers update their internal schemas. We need your help to make this library resilient!
Have an Unsupported Receipt / Found a Bug?
If you run into an invoice that fails to parse (such as Shufersal or a newly formatted receipt Layout):
- Open a New Issue on the israeli-invoice-parser-lib Bug Tracker.
- Crucial: Provide a real, live link to the invoice. Without a working URL, it is impossible to inspect the underlying network payload structure, test backend responses, or map out the necessary payload parameters.
- If you have suggestions or workarounds for bypassing Shufersal's anti-bot restrictions, please detail them inside the dedicated discussion issues!
Want to Add a New Parser?
We warmly welcome pull requests! To contribute a new parser:
- Subclass
BaseReceiptParserfrombase_parser.py. - Implement the
.parse(self, source_data: str) -> Dict[str, Any]method. - Map the data cleanly into our uniform dictionary format.
- Submit your PR directly to the GitHub Repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file israeli_invoice_parser-0.1.2.tar.gz.
File metadata
- Download URL: israeli_invoice_parser-0.1.2.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19c2b9530dfad1ef708a4c1d88da8ff178aba035cb8190e5e7a7fe7b27f66179
|
|
| MD5 |
9ecd68dc222e6b84d9959c8d75cf1625
|
|
| BLAKE2b-256 |
c1ec55a09748b3060a795f408144970653a71210121ef7869d82d812b3f72c62
|
File details
Details for the file israeli_invoice_parser-0.1.2-py3-none-any.whl.
File metadata
- Download URL: israeli_invoice_parser-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3dfd307935afc1239e49941549f8a8264b23379eca924499aa3b24ec2e091f4
|
|
| MD5 |
0e16bcf07cc823c9428726ed4b788f88
|
|
| BLAKE2b-256 |
95f0ce4097cb14f5bf2913bb440f8d60e00b4a318b13a10c1d79bd1ccc63039a
|