Git Product home page Git Product logo

python-flask-project's Introduction

Danny's Python Flask App

Welcome to Danny's Flask API App, where bread ingredients come to turn into recipes

The Install Dependencies are the following

  • pipenv
  • peewee
  • flask
  • psycopq2-binary

Running the API

In order to run the API you will need to create a bread_recipes database with the following command

CREATE DATABASE bread_recipes

After that you will need to clone this repo and set up your virtual environment within the python-flask-project directory with the following commands

git clone [email protected]:dmpellegrini/python-flask-project.git
pipenv shell

Finally, run the following command and you will have access to the api endpoints on 127.0.0.1:9000

python3 app.py

API Endpoints

If you simply access 127.0.0.1:9000/bread you can either retrieve all the bread recipes with a GET request, or you can add a bread recipe with a POST request.

Finally if you access 127.0.0.1:9000/bread/, a GET request will retrieve the bread by name, a PUT request will update any of the named bread's properties and finally a DELETE request will simply remove the type of bread from the database.

The schema for the bread recipes is the following and it is strict

  • name
  • four_grams = <grams_of_wheat>
  • water_grams = <grams_of_wheat>
  • salt_grams = <grams_of_wheat>
  • yeast_grams = <grams_of_wheat>
  • starter_grams = <grams_of_wheat>
  • servings_grams = <grams_of_wheat>

Future Goals for the API include more fleshed out recieps

python-flask-project's People

Contributors

dmpellegrini avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.