This CLI app allows you to interact with and modify a MySQL cookbook database using an API.
This API is not hosted and thus will need to be installed on your local machine.
Important
You will need:
- MySQL
Using Git, copy these files into a folder. Use this command:
git clone https://github.com/ChloeSAPage/Recipe-API.git
pip install -r requirements.txt
Warning
The file should be formatted as such, with the appropriate details. Otherwise it will not work
HOST = "localhost"
USER = ""
PASSWORD = ""
Warning
Use the supplied code in the /DB_SETUP directory to manually create a MySQL database. A DB will not be automatically created
Caution
Running the files in a different order may cause issues.
- Run app.py
- Run main.py
- Follow instructions in command line
- Endpoint:
/get-recipes - Method: GET
- Response: JSON
- Endpoint:
/get-recipe/<name> - Method: GET
- Parameters:
recipe-name(required). - Response: JSON
- Endpoint:
/submit-recipe/ - Method: PUT
- Response: 201
The API returns the appropriate HTTP status code.
Caution
Case sensitive


