Skip to content

Python Flask micro framework API design illustration

Notifications You must be signed in to change notification settings

danielogen/FlaskPizza-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Pizza Api

The project demonstrate to use of Flask micro framework for the creation of a an hypethoical Pizza Delivery Service API

Features

  • Use Flask with Flask-RESTX
  • Database integration with Flask SQLAlchemy
  • Authentication with JWT
  • Enviroment Seperation
  • Error handing with Werkzeug
  • API documentation with SwaggerUI and Flask-RESTX
  • Unit testing
  • Database Migration

Routes to Implement

Method Route Functionality Access
POST /auth/signup/ Register new user All users
POST /auth/login/ Login user All users
POST /orders/order/ Place an order All users
PUT /orders/order/update/{order_id}/ Update an order All users
PUT /orders/order/status/{order_id}/ Update order status Superuser
DELETE /orders/order/delete/{order_id}/ Delete/Remove an order All users
GET /orders/user/orders/ Get user's orders All users
GET /orders/orders/ List all orders made Superuser
GET /orders/order/{order_id}/ Retrieve an order Superuser
GET /orders/user/order/{order_id}/ Get user's specific order
GET /docs/ View API documentation All users

Python Packages

  1. Flask
  2. Flask-RESTX
  3. Flask-SQLAlchemy
  4. Flask-Migrate
  5. Flask-JWT-Extended
  6. Python-decouple
  7. Pytest

Running the project

Step 1:

Clone the project reposity

git clone https://github.com/danielogen/FlaskPizza-api.git

Step 2:

Change directory to project folder, create a virtual environment and activate it

$ cd FlaskPizza-api
$ python -m venv env
$ source env/bin/activate

Step 3:

Install all the required dependencies

$ pip install -r requirements.txt

Run the project in development

$ export FLASK_APP=api/
$ export FLASK_DEBUG=1
$ Flask run

python runserver.py

About

Python Flask micro framework API design illustration

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages