A Python wrapper for the Lidl Plus app API.
This project is a fork of: https://github.com/Andre0512/lidl-plus
- Python 3.12+
- Playwright (plus its required system dependencies)
-
a) Install the package:
pip install lidlplus-api[auth]
b)
If you use an OS/Distro that doesn't support playwright, and you want to use this with the refresh token, install:
pip install lidlplus-api
-
Install Playwright browsers:
playwright install chromium
-
Install system dependencies required by Playwright (varies by OS).
from lidlplus_api import LidlPlusApi
lidl = LidlPlusApi(
language="YOUR_LANGUAGE_CODE",
country="YOUR_COUNTRY_CODE",
# optional:
refresh_token="YOUR_REFRESH_TOKEN",
)
lidl.login(email="YOUR_EMAIL", password="YOUR_PASSWORD")- Import
lidlplus_apiin your project - Use the
LidlPlusApimethods below
-
Constructor
lidl = LidlPlusApi( language="YOUR_LANGUAGE_CODE", country="YOUR_COUNTRY_CODE", refresh_token="YOUR_REFRESH_TOKEN", # optional )
Initializes the
LidlPlusApiclient.
-
Login (Playwright)
lidl.login(email="YOUR_EMAIL", password="YOUR_PASSWORD")
Logs in to your Lidl Plus account using Playwright.
-
List receipts (paged, 25 per page)
lidl.receipts(only_favourite=False, pageNumber=1)
-
Get a specific receipt
lidl.receipt(ticket_id)
ticket_idcomes fromlidl.receipts()(idfield).
-
List coupons for a store
lidl.coupons(store_id)
store_idcomes fromlidl.get_stores(). -
Activate a coupon
lidl.activate_coupon(coupon_id)
-
Deactivate a coupon
lidl.deactivate_coupon(coupon_id)
coupon_idcomes fromlidl.coupons().
-
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()).
-
Promotion details
lidl.purchaseLottery_details(coupon_id)
-
Redeem promotion
lidl.redeem_purchaseLottery(coupon_id)
-
Promotion status
lidl.purchaseLottery_status(coupon_id)
coupon_idcomes from:lidl.home(store_id)["purchaseLottery"][0]["id"]
-
Get loyalty id
lidl.loyalty_id
-
Generate loyalty QR code
lidl.generate_loyalty_id()
-
List stores
lidl.get_stores()
-
Offers for a store
lidl.offers(store_id)
-
Brochures for a store
lidl.brochures(store_id)
-
Get translation keys
lidl.translations()
-
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)
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.