Skip to main content

Israel Supermarket Parsers: Clients to parser the data published by the supermarkets.

This is a parser for ALL the supermarket chains listed in the GOV.IL site.

שקיפות מחירים (השוואת מחירים) - https://www.gov.il/he/departments/legalInfo/cpfta_prices_regulations הגדרת הקבצים שהיו צריכים להיות זמינים באתרים - https://www.nevo.co.il/law_html/law01/501_131.htm

Unit & Integration Tests CodeQL Pylint Publish Docker image Upload Python Package

Daily Automatic Testing

The test suite is scheduled to run daily, so you can see if the supermarket chains have changed something in their interface and the package will not work properly.

Status: Scheduled Tests

🤗 Want to support my work?

Buy Me A Coffee

Got a question?

You can email me at erlichsefi@gmail.com

If you think you've found a bug:

  • Create issue in issue tracker to see if it's already been reported
  • Please consider solving the issue by yourself and creating a pull request.

What is il_supermarket_parsers?

A simple access layer to the data the supermarkets publish. You can download the data using https://github.com/OpenIsraeliSupermarkets/israeli-supermarket-scarpers.

You only need to run the following code to parse all the data currently shared by the supermarkets and was downloaded using the package above.

from il_supermarket_parsers import ConvertingTask

task = ConvertingTask(
    source_configuration={"folder": "dumps"},
    output_configuration=[{"output_mode": "csv", "output_folder": "outputs"}],
    status_configuration={"database_type": "json", "base_path": "outputs"},
)
task.start()
task.join()

Optional filters (same names as Docker): enabled_parsers, files_types, and multiprocessing. Pass a maximum number of files with task.start(limit=10).

Quick start

il_supermarket_parsers can be installed using pip:

python3 pip install il_supermarket_parsers

If you want to run the latest version of the code, you can install it from the repo directly:

python3 -m pip install -U git+https://github.com/OpenIsraeliSupermarkets/israeli-supermarket-parsers.git
# or if you don't have 'git' installed
python3 -m pip install -U https://github.com/OpenIsraeliSupermarkets/israeli-supermarket-parsers/main

Running Docker

Build yourself:

docker build -t erlichsefi/israeli-supermarket-parsers --target prod .

or pull the existing image from docker hub:

docker pull erlichsefi/israeli-supermarket-parsers:latest

Then running it using:

docker run  -v "./dumps:/usr/src/app/dumps" \
            -v "./outputs:/usr/src/app/outputs" \
            -e ENABLED_PARSERS="BAREKET,YAYNO_BITAN_AND_CARREFOUR" \
            -e ENABLED_FILE_TYPES="STORE_FILE" \
            -e NUMBER_OF_PROCESSES=4 \
            -e LIMIT=1 \
            erlichsefi/israeli-supermarket-parsers

Optional paths (defaults match the volumes above): DATA_FOLDER (input), OUTPUT_FOLDER (CSV output), STATUS_FOLDER (JSON status; defaults to OUTPUT_FOLDER). Optional tuning: NUMBER_OF_PROCESSES, ENABLED_PARSERS, and ENABLED_FILE_TYPES (comma-separated enum names), LIMIT.

Extraction verification

Set PARSER_VERIFY_EXTRACTION=full (default off) to check every parsed file against its XML in production, the same checks the chain test suite makes: row count vs id tags, header and id columns, every XML tag captured, nested element counts, and every cell value. ConvertingTask(extraction_verification=...) overrides the env var. Any other value fails at startup.

A file that does not match is recorded as failed in the parser status, with the mismatch as its error. Its rows are still written, so the data is not lost, and the failure shows up in the parse success rate.

The check reuses the XML the parser already loaded and the rows it already holds, so it adds no extra file read and almost no memory. Measured on 26 real PriceFull/PromoFull/Stores files (180 MB, Shufersal, King Store, Wolt), parsing took 9.0 s with off and 16.4 to 17.2 s with full, about 1.9x. Peak memory stayed the same.

Contributing

Help in testing, development, documentation and other tasks is highly appreciated and useful to the project. There are tasks for contributors of all experience levels.

If you need help getting started, don't hesitate to contact me.

Development status

IL SuperMarket Parser is beta software, as far as i see devlopment stoped until new issues will be found.

Metadata

Release files for il-supermarket-parser 1.0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for il-supermarket-parser 1.0.16
File Size Uploaded Provenance Actions
il_supermarket_parser-1.0.16.tar.gz 55.8 kB Without provenance Details for il_supermarket_parser-1.0.16.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for il-supermarket-parser 1.0.16
File Interpreter ABI Platform Actions
il_supermarket_parser-1.0.16-py3-none-any.whl Python 3 none any Details for il_supermarket_parser-1.0.16-py3-none-any.whl

Total release size: 135.3 kB

Release files / il_supermarket_parser-1.0.16.tar.gz

Download URL il_supermarket_parser-1.0.16.tar.gz
Size 55.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2e18b7551ff021760a62ec2bbbe9ce45eada4f91960c25fed3c5148e7f8b3084
BLAKE2b-256 checksum
How to use checksums
aaaad16f018ef3ad93928c3b6ec09e67499e885a3b0f50defdf7fd93e2aeac8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / il_supermarket_parser-1.0.16-py3-none-any.whl

Download URL il_supermarket_parser-1.0.16-py3-none-any.whl
Size 79.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf7d9cc5d51276c755dbe1d40a22c1d7fb49d635765c5d658bf817d321fbf044
BLAKE2b-256 checksum
How to use checksums
6c162b3fdf2ad8367ae2c11628ccbf977c2d224659d6adaf3ec02d1b89c9b601
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for il-supermarket-parser 1.0.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.16 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page