Skip to content
Tigran Khachatryan edited this page Feb 16, 2022 · 1 revision

Welcome to the BreakFastApi wiki!

Overview


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.

Installation


Docker

Coming soon!

Pip

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

Sample Requests & Responses


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:

Apps Powered by BreakFastApi


File Structure


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


Clone this wiki locally