essien1990 / RESTAPIs

A CRUD users REST API using Python3 Flask and FastAPI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RESTAPIs

CRUD REST API using Python3, Flask, FastAPI and PostgreSQL database

Task

  • Import Flask and FastAPI packages
  • Use In-memory list approach for REST API CRUD(GET,POST,PUT,DELETE) methods
  • Create Users API using FastAPI by creating a fake database using pydantic inheriting from BaseModel
  • Create Cars API using Flask and PostgreSQL database using SQLAlchemy ORM to have consistent data
  • Create Users API using FastAPI Async SQL (Relational Database) using PostgreSQL database and SQLAlchemy ORM to have consistent data
  • Download dummy data from https://www.mockaroo.com/ for testing an API
  • Use Postman or an extension on VScode called Thunder client or swagger UI to test the REST API

Technologies

  • Programming Language
    • Python3

Python Framework

  • Flask Framework
  • FastAPI Framework

Python Dependencies using pip

  • Flask-migrate
  • Flask-SQLAlchemy
  • Jsonify
  • Pydantic
  • Request
  • Uvicorn server
  • json
  • passlib
  • uuid
  • databases
  • typing
  • bcrypt

API Testing Tools

  • Postman
  • Thunder Client
  • Insomnia
  • Swagger UI

Code Editor

  • VSCode

Execute Flask & FastAPI

  • Flask

    • python app.py or flask run
    • locahost:5000/api
  • FastAPI

    • uvicorn main:app --reload
    • localhost:8000/api

About

A CRUD users REST API using Python3 Flask and FastAPI


Languages

Language:Python 96.7%Language:Mako 3.3%