OpenFoodFacts is the 5th project for the Python formation at Openclassrooms.
This Python script will query the API of OpenFoodFacts in order to propose to the user, according to his choices, a food of substitution.
- Python for the script
- MySQL for the DBMS
- the user selects a food category
- the user chooses a food of the category
- the script will query the OpenFoodFacts API
- the script displays the substitute food for the food selected by the user.
- the script also displays the product description, a store or buy it and a link to the Open Food Facts website
- The user has the possibility to save the substitute food in a given database
Installation for Windows:
- Download the get-pip.py (link below) installer script. Save As and save it on your computer, such as your Downloads folder.
get-pip.py for Python 3.2 or later
-
Open a Command (Window+r -> write cmd) and navigate to the get-pip.py file.
-
Run the following command:
python get-pip.py
Well done, you have install pip, let's go for the next step.
-
For install the dependences navigate to the folder of the project with command and use this:
pip install -r requirements.txt
- Now you can use the script with command
Installation for Mac:
- Open a Command and run the following command:
sudo easy_install pip
Well done, you have install pip, let's go for the next step.
-
For install the dependences navigate to the folder of the project with command and use this:
pip install -r requirements.txt
- Now you can use the script with command
Link of the OpenFoodFacts API