Skip to content

Simple API in Python FastAPI Framework wtih all default features: router, user, authentication, DB connection, CRUD operations

License

Notifications You must be signed in to change notification settings

perviz3003/python-fastapi-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-fastapi-api

This small piece of API contains all basic features that API's must have. App is created in FastAPI Python framework. Database (PostgreSQL in our case) connection handled using SQL Alchemy. Pydantic used for data parsing and validation.

Installation

  1. Clone the repository to your development environment:
git clone https://github.com/perviz3003/python-fastapi-api.git
  1. cd into that folder and create virtual environment:
cd python-fastapi-api
python3 -m venv venv
  1. Activate environment and install all required packages from Requirements.txt file using the package manager pip:
source env/bin/activate
pip install -r Requirements.txt

Usage

If you have installed all required packages successfully, you should simply execute below command in terminal:

uvicorn api.main:app --reload

Now you can access your api from web browser: http://127.0.0.1:8000

FastAPI provides two beautiful API interface which generate API Docs automatically:

About

Simple API in Python FastAPI Framework wtih all default features: router, user, authentication, DB connection, CRUD operations

Topics

Resources

License

Stars

Watchers

Forks

Languages