2.2 KiB
2.2 KiB
Documentation
Created with
python 3.6.4
Requests
- ~
PyMySQL
oropenfoodfacts-python
~TODO #4
Installation
- get the code :
git clone git@github.com:freezed/ocp5.git
- create a dedicated virtualenv :
python3 -m venv .venv; source .venv/bin/activate
- adds dependencies :
cd ocp5; pip install -r requirements.txt
Collects data
- OpenFoodFacts data uses more than 170 fields. Here are those we keep localy :
code
product_name
categories_fr
nutrition-score-fr_100g
- Request will only ask for tagged products with
'countries':'france'
- Physical Data Model
- ~Creates local MariaDB/MySQL :
./create-db.py
~TODO #2
Use de CLI to get alternate product
-
~run it :
./main.py
~TODO #5
-
~follow instructions :~
TODO #5
-
Find an alternative product
- Type the number corresponding to the product's category
- Type the number corresponding to the choosen alternative product
- The system shows you the product sheet :
- description
- a shop where you can buy it (if available)
- the product link to OpenFoodFacts website
- Decide if you want to save the alternative product in DB
-
Retrieve saved alternatives products
- Type the number corresponding to the choosen alternative product
- The system shows you the product sheet :
- description
- a shop where you can buy it (if available)
- the product link to OpenFoodFacts website
-