-
Notifications
You must be signed in to change notification settings - Fork 20
Home
Tigran Khachatryan edited this page Feb 16, 2022
·
1 revision
Welcome to the BreakFastApi wiki!
The most delicious API on the web. Just send a request and you'll receive the most mouth watering dish recipe with estimated cooking time and all the necessary ingredients and instructions.
Coming soon!
Move to the api directory
cd breakfastapi
Create Virtual Environment and activate it.
python3 -m venv venv
. venv/bin/activate
Install dependencies
pip install -r requirements.txt
Run main.py with python 3
python3 main.py
Get Random Recipe:
import requests
r = requests.get("https://breakfastapi.fun/")
data = r.json()
Sample response:
{
"status": 200,
"recipe": {
"id": 11574,
"name": "Devils Steak Sauce Recipe",
"total_duration": 15,
"ingredients": ["brown sugar",
"tomato sauce",
"raspberry",
"worcestershire sauce",
"hot pepper",
"black pepper",
"vinegar"
],
"directions": "In a saucepan over high heat, blend raspberry jam..."
}
}
Get Recipe by id:
Get Multiple Recipes:
BreakFastApi
β README.md
β main.py # Main app
β requirements.txt # Dependencies
β LICENSE
ββββdb # Database directory
β β database.py # Database queries
β β recipies.db # Main database
ββββmodels # Response Schemas
β β recipie.py # recipe response schemas
β β error.py # error response schemas
ββββimages # Images