Python API client for Lidl Connect
Project description
LidlConnect.py
Unofficial Python library for the Lidl Connect Self-Care API (Austria).
Installation
pip install LidlConnect.py
Usage
from lidlconnect import LidlConnect
with LidlConnect(identifier="069012345678", puk="12345678") as client:
user = client.user.get()
print(f"Name: {user['name']}")
print(f"Balance: {client.user.balance}")
usage = client.usage.get()
data = client.usage.data
print(f"Data: {data['remaining']}/{data['total']} {data['unit']}")
print(f"Package valid until: {client.usage.valid_to}")
The context manager handles login and logout automatically. If you prefer manual control:
client = LidlConnect(identifier="069012345678", puk="12345678")
client.initialize()
# ... do stuff ...
client.logout()
You can also authenticate with a password instead of PUK:
client = LidlConnect(identifier="069012345678", password="yourPassword")
API
The client is split into namespaced sub-clients:
client.user
client.user.get() # raw user dict
client.user.name
client.user.phone_number
client.user.balance
client.user.bonus_balance
client.user.status
client.user.has_password
client.user.birth_date
client.user.customer_type
client.user.customer_language
client.user.activation_date
client.user.deactivation_date
client.user.imsi
client.user.iccid
client.user.is_esim
client.user.notification_settings
client.user.topup_settings
client.usage
client.usage.get() # raw usage dict
client.usage.data # {"remaining", "total", "used", "unit"}
client.usage.eu_data
client.usage.minutes
client.usage.international_minutes
client.usage.tariff_name
client.usage.valid_from
client.usage.valid_to
client.usage.next_renewal
client.usage.gross_price
client.usage.download_speed # bytes/sec or None
client.usage.upload_speed
client.usage.queued
client.tariffs
client.tariffs.get_available() # CMS catalog (names, descriptions)
client.tariffs.get_switchable() # tariffs switchable at next billing cycle
client.tariffs.get_purchasable() # add-ons available to buy now
client.tariffs.get_balance() # account balance
client.tariffs.switch(item_id) # schedule a tariff switch
client.tariffs.buy(item_id) # buy an add-on immediately
client.invoices
client.invoices.get_invoices()
client.invoices.get_vouchers()
client.invoices.get_calls(page=1, size=50)
client.invoices.get_config()
client.invoices.get_timeline()
client.invoices.download_calls() # returns bytes
client.invoices.total_spent() # sum of invoices + vouchers
client.invoices.last_payment_date()
client.settings
client.settings.get_services()
client.settings.get_topup()
client.settings.get_consents()
client.settings.get_egn()
client.settings.update_service(service_id, active)
client.settings.update_topup(settings)
client.settings.update_notifications(email_enabled, sms_enabled)
client.settings.update_egn(mask_premium, mask_non_premium)
client.settings.update_consents(consents)
client.credit
client.credit.topup(code)
client.credit.get_balance()
client.credit.get_payment_channels()
Error handling
from lidlconnect import LidlConnect, AuthError, APIError
try:
with LidlConnect(identifier="069012345678", puk="12345678") as client:
print(client.user.balance)
except AuthError as e:
print(f"Login failed: {e}")
except APIError as e:
print(f"API error {e.status_code}: {e}")
Requirements
- Python 3.10+
requestsbeautifulsoup4
License
MIT
Disclaimer
This is an unofficial library, not affiliated with or endorsed by Lidl or any of its affiliates.
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
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 lidlconnect_py-0.2.0.tar.gz.
File metadata
- Download URL: lidlconnect_py-0.2.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ce906c4518305e5fe2fbaa7d3dd80ba606494171980aa92e15ea47e7b977d09
|
|
| MD5 |
d5d399deea424ee66bd61a7b0ea8545d
|
|
| BLAKE2b-256 |
38d9fef1a80c343d77e70187bdd06318d464296bfd70022be5889b3b280a76a4
|
Provenance
The following attestation bundles were made for lidlconnect_py-0.2.0.tar.gz:
Publisher:
python-publish.yml on Kizuren/LidlConnect.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lidlconnect_py-0.2.0.tar.gz -
Subject digest:
0ce906c4518305e5fe2fbaa7d3dd80ba606494171980aa92e15ea47e7b977d09 - Sigstore transparency entry: 1957879319
- Sigstore integration time:
-
Permalink:
Kizuren/LidlConnect.py@89163c01abcb1272713e15887a7439ae52c4475c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Kizuren
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@89163c01abcb1272713e15887a7439ae52c4475c -
Trigger Event:
release
-
Statement type:
File details
Details for the file lidlconnect_py-0.2.0-py3-none-any.whl.
File metadata
- Download URL: lidlconnect_py-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bc53c0e086fef1913cba7566c1725505302e8cd7096e354e27c8104469f144a
|
|
| MD5 |
d943133b31274627e37f2cce855de947
|
|
| BLAKE2b-256 |
0dd9f5820d346197d4f23a0bb41b02477f59ee9d3bcd6f2df2d33092f3e08e50
|
Provenance
The following attestation bundles were made for lidlconnect_py-0.2.0-py3-none-any.whl:
Publisher:
python-publish.yml on Kizuren/LidlConnect.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lidlconnect_py-0.2.0-py3-none-any.whl -
Subject digest:
1bc53c0e086fef1913cba7566c1725505302e8cd7096e354e27c8104469f144a - Sigstore transparency entry: 1957879526
- Sigstore integration time:
-
Permalink:
Kizuren/LidlConnect.py@89163c01abcb1272713e15887a7439ae52c4475c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Kizuren
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@89163c01abcb1272713e15887a7439ae52c4475c -
Trigger Event:
release
-
Statement type: