https://github.com/yanliu1111/flask-rest-api-project
🛒 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.
https://github.com/yanliu1111/flask-rest-api-project
flask-api flask-jwt flask-restx-api postgresql pytest sqlite3
Last synced: 3 months ago
JSON representation
🛒 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.
- Host: GitHub
- URL: https://github.com/yanliu1111/flask-rest-api-project
- Owner: yanliu1111
- Created: 2023-04-03T21:25:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-08-22T04:11:46.000Z (11 months ago)
- Last Synced: 2025-08-22T06:23:27.111Z (11 months ago)
- Topics: flask-api, flask-jwt, flask-restx-api, postgresql, pytest, sqlite3
- Language: Python
- Homepage: https://flask-rest-api-project-rmrw.onrender.com/
- Size: 408 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```bash
$ 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/

## Run the project in production environment

## 1. Signup a new user


## 2. Login with the user


## 3. Authorization with JWT successfully


## Reference:
👍 **Very good Flask learning resource from Youtuber [Ssali Jonathan](https://www.youtube.com/watch?v=OEZxEY_wdN4&list=PLEt8Tae2spYnFMndU9EM082imnnzke07J)** update