Coder Social home page Coder Social logo

yanliu1111 / flask-rest-api-project Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 416 KB

๐Ÿ›’ 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.

Home Page: https://flask-rest-api-project-rmrw.onrender.com/

Python 100.00%
flask-api flask-restx-api flask-jwt pytest postgresql sqlite3

flask-rest-api-project's Introduction

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

flask-rest-api-project's People

Contributors

yanliu1111 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.