Skip to main content

Implementation of the Lidl Plus mobile app api in Python.

Project description

lidlplus-api

A Python wrapper for the Lidl Plus app API.

This project is a fork of: https://github.com/Andre0512/lidl-plus


Requirements

  • Python 3.12+
  • Playwright (plus its required system dependencies)

Installation

  1. Install the package:

    pip install lidlplus-api
    
  2. Install Playwright browsers:

    playwright install
    
  3. Install system dependencies required by Playwright (varies by OS).


Quick start

from lidlplus_api import api

lidl = api.LidlPlusApi(
    language="YOUR_LANGUAGE_CODE",
    country="YOUR_COUNTRY_CODE",
    # optional:
    refresh_token="YOUR_REFRESH_TOKEN",
)

lidl.login(email="YOUR_EMAIL", password="YOUR_PASSWORD")

Usage

  1. Import lidlplus_api in your project
  2. Use the LidlPlusApi methods below

API reference

Create client

  • Constructor

    lidl = api.LidlPlusApi(
        language="YOUR_LANGUAGE_CODE",
        country="YOUR_COUNTRY_CODE",
        refresh_token="YOUR_REFRESH_TOKEN",  # optional
    )
    

    Initializes the LidlPlusApi client.


Authentication

  • Login (Playwright)

    lidl.login(email="YOUR_EMAIL", password="YOUR_PASSWORD")
    

    Logs in to your Lidl Plus account using Playwright.


Receipts

  • List receipts (paged, 25 per page)

    lidl.receipts(only_favourite=False, pageNumber=1)
    
  • Get a specific receipt

    lidl.receipt(ticket_id)
    

    ticket_id comes from lidl.receipts() (id field).


Coupons

  • List coupons for a store

    lidl.coupons(store_id)
    

    store_id comes from lidl.get_stores().

  • Activate a coupon

    lidl.activate_coupon(coupon_id)
    
  • Deactivate a coupon

    lidl.deactivate_coupon(coupon_id)
    

    coupon_id comes from lidl.coupons().


Coupon Plus (experimental)

  • Start Coupon Plus

    lidl.start_couponplus()
    

    EXPERIMENTAL — probably doesn’t work.

  • Coupon Plus status/info

    lidl.couponplus(store_id)
    

    DOESN’T WORK — fetches info for the current month’s Coupon Plus (store from lidl.get_stores()).


Scratch card / Fortune wheel (purchaseLottery)

  • Promotion details

    lidl.purchaseLottery_details(coupon_id)
    
  • Redeem promotion

    lidl.redeem_purchaseLottery(coupon_id)
    
  • Promotion status

    lidl.purchaseLottery_status(coupon_id)
    

    coupon_id comes from: lidl.home(store_id)["purchaseLottery"][0]["id"]


Loyalty

  • Get loyalty id

    lidl.loyalty_id
    
  • Generate loyalty QR code

    lidl.generate_loyalty_id()
    

Stores / Offers / Brochures

  • List stores

    lidl.get_stores()
    
  • Offers for a store

    lidl.offers(store_id)
    
  • Brochures for a store

    lidl.brochures(store_id)
    

Translations

  • Get translation keys

    lidl.translations()
    

Misc

  • Active coupons count

    lidl.activecoupons_count(store_id)
    
  • Home page data

    lidl.home(store_id)
    
  • Today’s store schedule

    lidl.store_schedule(store_id)
    
  • Store details

    lidl.store_details(store_id)
    

Legal Notice

This application is an open source project written in Python, which uses the API of the Lidl Plus application, owned by Lidl Stiftung & Co. KG. The application was created solely for educational purposes and is not affiliated with Lidl Stiftung & Co. KG. The creator of the application is not affiliated with Lidl Stiftung & Co. KG. in any way and does not derive any financial benefits from this project. All trademarks, trade names, and logos are the property of their respective owners. Users use the application at their own risk.

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

lidlplus_api-0.0.3.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

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

lidlplus_api-0.0.3-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file lidlplus_api-0.0.3.tar.gz.

File metadata

  • Download URL: lidlplus_api-0.0.3.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lidlplus_api-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3715e3cc963ebfa63150efd0bbc4aa6f50ba3a8686f51039373430239bae6c00
MD5 c6b2c356fe96db64f35e9d0090e36bd3
BLAKE2b-256 0d7c579e48b43e76b4163a4c9f67c7c1acacdf1e60e7b200bcb11b61be8fdd88

See more details on using hashes here.

Provenance

The following attestation bundles were made for lidlplus_api-0.0.3.tar.gz:

Publisher: publish.yml on zsobix/lidlplus-api

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

File details

Details for the file lidlplus_api-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: lidlplus_api-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lidlplus_api-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d2603eda8d90bd7479420eb553178ca6693cae0628413c31f03210f2dc7d2cd1
MD5 3f778fd706058fb3c62805b1e12acd23
BLAKE2b-256 275aee1655f52c832b2bb4a7ca6c3f9b93804ad2e51336107a2b301a04c54f80

See more details on using hashes here.

Provenance

The following attestation bundles were made for lidlplus_api-0.0.3-py3-none-any.whl:

Publisher: publish.yml on zsobix/lidlplus-api

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