AppiePy: A Python API for Albert Heijn
AppiePy is a wrapper around Albert Heijn products you can find on their website https://ah.nl/. It allows you to retrieve information about these products and use it inside your application. Common uses are price/discount information, brand/category information, or nutritional information.
Installation
Installation can be done through pip:
pip install appiepy
Usage
from appiepy import Product
import json
# Full product url
product = Product('https://www.ah.nl/producten/product/wi193679/lay-s-paprika')
# Or just the path
product = Product('/producten/product/wi193679/lay-s-paprika')
print(json.dumps(product.__dict__, indent=4, sort_keys=True))
# {
# "allergy": ["melk", "glutenbevattende granen", "tarwe"],
# "brand": "Lay's",
# "category": "Snoep, koek, chips en chocolade/Paprika chips",
# "description": "Lay's Paprika",
# "discount_period": "vanaf maandag",
# "discount_type": "2 voor 2.00",
# "features": [
# { "identifier": "green_dot", "text": "Groene Punt" },
# { "identifier": "recyclable_general_claim", "text": "Recyclebaar" }
# ],
# "id": "wi193679",
# "image_url": "https://static.ah.nl/static/product/AHI_43545239373137323733_1_LowRes_JPG.JPG",
# "ingredients": [
# "aardappelen",
# "plantaardige oli\u00ebn (zonnebloem, koolzaad, ma\u00efs, in wisselende hoeveelheden)",
# "paprikasmaak [suiker, zout, paneermeel (van [b]TARWE[/b]), paprika, [b]MELKWEI[/b]-permeaat, uienpoeder, kaliumchloride, aroma's, knoflookpoeder, johannesbroodpitmeel, kleurstof (paprika-extract), rookaroma's, voedingszuren (citroenzuur en appelzuur)]"
# ],
# "is_available": true,
# "is_discounted": false,
# "nutrition": {
# "Eiwitten": "6.4 g",
# "Energie": "2244 kJ (538 kcal)",
# "Koolhydraten": "54 g",
# "Vet": "32 g",
# "Voedingsvezel": "4.8 g",
# "Waarvan suikers": "2.7 g",
# "Waarvan verzadigd": "3.9 g",
# "Zout": "1.2 g"
# },
# "price_current": 1.49,
# "price_previous": null,
# "summary": "De enige echte Lay's chips met paprikasmaak[list][*]Zonder kunstmatige kleurstoffen en conserveringsmiddelen\n[*]Zonder toegevoegde smaakversterkers\n[*]Bevat 7-8 porties\n[/list]",
# "unit_size": "225 g",
# "url": "/producten/product/wi193679/lay-s-paprika"
# }
Command Line Usage
python3 -m appiepy /producten/product/wi193679/lay-s-paprika
This logs a JSON representation of the product, similar to the logged output above.
Metadata
Release files for appiepy 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| appiepy-0.2.4.tar.gz | 5.4 kB | Without provenance | Details for appiepy-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| appiepy-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for appiepy-0.2.4-py3-none-any.whl |
Total release size: 10.7 kB
Release files / appiepy-0.2.4.tar.gz
| Download URL | appiepy-0.2.4.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f489e6c106684538d674a754da2f81ce69824731b9e2b5840b24abd5ff9b4cc5
|
|
BLAKE2b-256 checksum How to use checksums |
30e120667704dfd36edd902e4a97889a1d769139204a8c2c75a2d367e2de5c6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2
|
Release files / appiepy-0.2.4-py3-none-any.whl
| Download URL | appiepy-0.2.4-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7766a1c14888ba61d9098c94b8488f0713ad64a35af1ee5394d919180e9b588c
|
|
BLAKE2b-256 checksum How to use checksums |
c2ad0a259974a21fe9320f0ea6b76afa940a1ec507c3e9bc3ed94f6d98afe245
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2
|
Security for appiepy 0.2.4
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.