Skip to content

๐Ÿ›๏ธ A Mercadona interface for Python to track product prices, amounts, and more.

License

Notifications You must be signed in to change notification settings

jtayped/mercapy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

95 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


mercapy
๐Ÿ›๏ธ mercapy

A Mercadona interface for Python to track product prices, amounts, and more.

๐Ÿ”ง How to use it

First of all, install the package using:

pip install mercapy

By initializing the mercadona class, you can search products, recommendations, and new arrivals:

from mercapy import Mercadona

mercadona = Mercadona()

mercadona.search("galletas")
mercadona.get_new_arrivals()
mercadona.get_home_recommendations()

Each product has statistics such as:

from mercapy import Product

# Find product by ID
prod = Product("12345")

prod.name               # Beer
prod.unit_price         # 1.25โ‚ฌ
prod.previos_price      # 1.95โ‚ฌ
prod.is_discounted      # True
prod.bulk_price         # 7.5โ‚ฌ
prod.is_pack            # True
prod.weight             # 0.5kg
prod.age_check          # True
prod.alcohol_by_volume  # 3.2%
prod.iva                # 21%

You can also interact with product photos:

from mercapy import Product

# Find product by ID
prod = Product("12345")
prod.images[0].save("product.png", width=1920, height=1080)

More docs coming soon...

๐Ÿ™‹โ€โ™‚๏ธ You may also like...