Check the availability of Lego™ product in stores.
This tools is not related in any way to LEGO™ and all of it's trademark.
This tools is not designed for malicious usage and any individual or group using it this way is responsible for is own actions.
pip3 install lego-store-availability
First you need to create a Store
object :
from lego_store_availability import Store
store = Store(lang="fr-fr")
Then request a Product
:
from lego_store_availability import Product
product = Product(id="ahsoka-tano-40539")
product.load(store)
print(product.name, product.availability)
You can use the example in example folder :
PYTHONPATH=src/ python3 example/main.py example/config.yml
Result :
Le Taj Mahal 21056 ==> in stock
Ahsoka Tano™ 40539 ==> out of stock
Doctor Who 21304 ==> out of stock
- Clone or fork the repository.
- Install dev dependencies with
pip3 install -r dev-requirements.txt
- Develop your feature or fix
- Lint with pylint
- Test it with pytest under tests/ directory
- Mock HTTP requests with responses
- Push & create a Pull Request on
develop
branch - Wait for the CI (Github Action) to exit in success state