Skip to content

πŸ›’ Implemented an Order and Delivery Backend System with Database Management, including User Authentication and Staff Authorization. Streamlined Operations with Monitoring of Production Descriptions and Delivery Status.

Notifications You must be signed in to change notification settings

yanliu1111/flask-rest-api-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FLASK REST API PROJECT, deployed on Render.com

Deployed in Render.com, check it out πŸ‘‰ https://flask-rest-api-project-rmrw.onrender.com/
Database transformation: SQLite -> PostgreSQL

Tools and Technologies πŸ› οΈ:

Flask, Flask-SQLAlchemy, Flask-JWT-Extended, Flask-RESTX, Python-Decouple, PyTest, SwaggerUI, Werkzeug, Unittest, Render.com, PostgreSQL, DB browser, SQLite

Practicing Include πŸ“š:

  • Flask REST API with Python
  • Environment variables with Python-Decouple
  • JWT Authentication with Flask-JWT-Extended
  • Databases with Flask-SQLAlchemy
  • How to write Unit Tests with Unittest and PyTest
  • Documenting REST APIs with SwaggerUI and Flask-RESTX
  • Error Handling with Werkzeug

Basic Setup πŸš€

Enter the project folder and create a virtual environment

$ python -m venv env
$ source env/bin/actvate #On linux Or Unix
$ source env/Scripts/activate #On Windows
$ pip install -r requirements.txt #Install all requirements
python runserver.py #Run the server

Changed the id type from integer to serial in the table

Note: While transferring the database schema from SQLite to PostgreSQL, I encountered errors when signing up new users and creating new orders in SwaggerUI. After thorough troubleshooting, I discovered that PostgreSQL does not auto-increment the ID, unlike SQLite. To resolve this, I deleted the transformed old table in HeidiSQL, changed the ID type to serial, created a new table, inserted data, and implemented SQL auto-increment code in the table, which resolved the issue.

DEMO Time πŸ›’

Run the project in development environment

Database: SQLite || Backend test tool: Thunder Client
localhost http://127.0.0.1:5000/ screenshot1

Run the project in production environment

screenshot1

1. Signup a new user

screenshot1 screenshot1

2. Login with the user

screenshot1 screenshot1

3. Authorization with JWT successfully

s

s

Reference:

πŸ‘ Very good Flask learning resource from Youtuber Ssali Jonathan

About

πŸ›’ Implemented an Order and Delivery Backend System with Database Management, including User Authentication and Staff Authorization. Streamlined Operations with Monitoring of Production Descriptions and Delivery Status.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages