Skip to main content

A Python API for Albert Heijn

Project description

Version PyPI - License

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
from pprint import pprint

# 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')

pprint(vars(products))

# {
#     'brand': "Lay's",
#     'category': 'Snoep, koek, chips/Paprika chips',
#     'description': "Lay's Paprika",
#     'features': [{'identifier': 'green_dot', 'text': 'Groene Punt'}],
#     'id': 'wi193679',
#     'ingredients': ['aardappelen',
#                     ' plantaardige oliën (zonnebloem (26%), koolzaad (6%))',
#                     ' paprikasmaak [suiker, zout, paneermeel (van TARWE), '
#                     'paprika, MELKWEI-permeaat, uienpoeder, kaliumchloride, '
#                     "aroma's, knoflookpoeder, johannesbroodpitmeel, kleurstof "
#                     "(paprika-extract), rookaroma's, zuurteregelaars (citroenzuur "
#                     'en appelzuur)].'],
#     'is_available': True,
#     'is_discounted': False,
#     'nutrition': {'Eiwitten': '6.1 g',
#                   'Energie': '2215 kJ (531 kcal)',
#                   'Koolhydraten': '52 g',
#                   'Vet': '32 g',
#                   'Voedingsvezel': '4.6 g',
#                   'Waarvan suikers': '2.4 g',
#                   'Waarvan verzadigd': '2.7 g',
#                   'Zout': '1.4 g'},
#     'price_current': 1.29,
#     'price_previous': None,
#     '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'
# }

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

appiepy-0.2.0.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

appiepy-0.2.0-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page