Skip to main content

Unofficial Lidl Plus API client

Project description

iLidl

Unofficial Python client and CLI for the Lidl Plus API. Fetch receipts, parse item details, and manage coupons.

Installation

pip install ilidl

# Or with uv
uv add ilidl

# With auth support (requires Playwright for login)
pip install "ilidl[auth]"
playwright install chromium

Authentication

ilidl login

Launches a headless browser to complete the Lidl Plus OAuth flow. You'll be prompted for your phone number and a verification code. A refresh token is saved to ~/.config/ilidl/config.toml for future use.

CLI Usage

# Receipts
ilidl receipt latest              # Most recent receipt
ilidl receipt latest --json       # As JSON
ilidl receipt <id>                # Specific receipt
ilidl receipts                    # List all receipts
ilidl receipts --from 2026-03-01  # Filter by date
ilidl receipts --to 2026-03-18

# Coupons
ilidl coupons list                # List available coupons
ilidl coupons activate <id>       # Activate a coupon
ilidl coupons activate --all      # Activate all coupons
ilidl coupons deactivate <id>     # Deactivate a coupon

All commands support --json for machine-readable output.

Library Usage

from ilidl import LidlClient

client = LidlClient(refresh_token="...", country="GB", language="en")

# Get latest receipt with parsed items
receipt = client.latest_receipt()
for item in receipt.items:
    print(f"{item.name}: {item.price}")

# List coupons
for coupon in client.coupons():
    print(f"{coupon.title} (active: {coupon.is_activated})")

Configuration

Stored at ~/.config/ilidl/config.toml:

[auth]
refresh_token = "..."

[account]
language = "en"
country = "GB"

Notes

  • UK receipts are returned as HTML by the API and parsed into structured items using data-* attributes.
  • The App-Version header must be a realistic value (currently 16.45.5). The API rejects fake versions.
  • API v2 is used for receipt lists, v3 for receipt detail.
  • This project replaces the upstream lidl-plus library which is broken on modern Python.

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

ilidl-0.1.0.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

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

ilidl-0.1.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file ilidl-0.1.0.tar.gz.

File metadata

  • Download URL: ilidl-0.1.0.tar.gz
  • Upload date:
  • Size: 31.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ilidl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ea917c5d44052f8b4de52ba7da0bf54ef31a9c4a1576bb8beb0b064a15d1e6e8
MD5 53205ab4a60cb362aa59829100d2683f
BLAKE2b-256 eb0b907b9a6a0c61c17828465deb53f7f53288b28978c7896fe5fb405e4e18fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for ilidl-0.1.0.tar.gz:

Publisher: publish.yml on RoryDotGG/iLidl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ilidl-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ilidl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ilidl-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ed7c24862021579be26292d8532c32766d91f40a005c9c8021b01052f01863a
MD5 cf08c5cd5bcfb700ce8c66e99e3e0000
BLAKE2b-256 24be151026538c76e7cfb4f2d174b22ff78ba6aa13ed34d6a7623c0ed35eb186

See more details on using hashes here.

Provenance

The following attestation bundles were made for ilidl-0.1.0-py3-none-any.whl:

Publisher: publish.yml on RoryDotGG/iLidl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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