• Stars
    star
    191
  • Rank 202,877 (Top 4 %)
  • Language
    Python
  • Created almost 2 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dockerized FastAPI boiler plate similar to Django code structure with views, serializers(pydantic) and model( Sqlalchemy ORM) with dockerized database(PostgresSQL) and PgAdmin. ๐Ÿš€

๐Ÿฒ FastAPI Boilerplate

The simplest production ready Django like FastAPI boilerplate ๐Ÿ

fastapi boilerplate


๐Ÿ’Ž Features

โœ… Production ready with one docker-compose command.
โœ… Similar to Django Code Structure.
โœ… Local dockerized db.
โœ… Dockerized PgAdmin to check the db records.
โœ… Migrations, Serializers and ORM configured.
โœ… CRUD APIs (Sneaker App).
โœ… Token Authentication.
โœ… Logging Mechanism.
โœ… Testcases TDD with Pytest.
โœ… Seperate Database(Sqlite) and mock session configured for test cases.
โœ… Poetry dependency management and packaging made easy. (Better than pip)

โš’๏ธ Techologies Used

  • Alembic: For Database Migrations.
  • SQLAlchemy: For ORM.
  • Pydantic: For Typing or Serialization.
  • Pytests: For TDD or Unit Testing.
  • Poetry: Python dependency management and packaging made easy. (Better than pip)
  • Docker & docker-compose : For Virtualization.
  • postgresSQL: Database.
  • PgAdmin: To interact with the Postgres database sessions.
  • Loguru: Easiest logging ever done.

๐Ÿš€ Up and run in 5 mins ๐Ÿ•™

Make sure you have docker and docker-compose installed docker installation guide

Step 1

create .env file in root folder fastapi-boilerplate/.env

DATABASE_URL=postgresql+psycopg://postgres:password@db:5432/boiler_plate_db
DB_USER=postgres
DB_PASSWORD=password
DB_NAME=boiler_plate_db 
[email protected]
PGADMIN_PASSWORD=admin
X_TOKEN=12345678910

Step 2

docker-compose up

๐ŸŽ‰ Your Production Ready FastAPI CRUD backend app is up and running on localhost:8000

  • Swagger docs on localhost:8000/docs

fastapi boilerplate

  • GET request example

fastapi boilerplate

  • PgAdmin on localhost:5050

fastapi boilerplate

More Repositories

1

MyUnfollowers-App

๐Ÿš€ A platform to inspect GitHub's followers/unfollowers with visualizations and stats.
Vue
27
star
2

Zoom-Bot-to-take-Online-Classes

A python zoom bot which automates the process of joining zoom meeting. Just left you pc open the script will run automatically at the particular scheduled time.
Python
11
star
3

Google-Meet-Bot-to-attend-meetings

This bot will join meet meetings automatically
Python
9
star
4

Events-Registration-App

Event Registration Vue.js app with the Python-Django Backend ๐Ÿ˜Ž
Vue
9
star
5

Django-Restful-CRUD-API

Event Registration CRUD RestFul API ๐Ÿ‘พ
Python
8
star
6

Instagram-Bot-to-send-DMs

Python
6
star
7

Preemptive-scheduling-Algorithms-Python

This repository contains Round Robin, Shortest Job first, Priority Scheduling Algorithms.
Python
5
star
8

Resizable-Array-python

Resizable/Dynamic Array is my third semester course Data Structure's project .
Python
5
star
9

BURQ-single-cyclic-core-RISC-V

This is the single cyclic core based on RISC-V ISA code is in chisel language which is a module of Scala language.e
TeX
5
star
10

Tkinter-Tutorial

Repository contains Python GUI Tkinter guide. Find tutorial and implementation on PyTroops YouTube channel.
Python
4
star
11

Cryptocurrencies-Data-Analysis

cryptocurrencies API pulled, graph plot data analysis of bitcoin and ether coin.
Jupyter Notebook
4
star
12

5-stage-pipeline-core-RISC-V_ISA

This repository contains 5 stage pipeline core on RISC-V ISA.
TeX
4
star
13

UnitTesting-using-Selenium

A python app which does unit testing for given URL site, elements and other fields can be customized easily.
Python
4
star
14

Books-For-You-FLASK-APPLICATION

Books For You is a Flask web application which ask for ISBN number of a book and return all the mandatory information about the book.
Python
4
star
15

Auto-Emails-and-Certificates

Python
3
star
16

Django-Students-Registration-CRUD-App

Python
3
star
17

Kafka-Python-Example

A Guide to setup Kafka with Python in less than 5 minutes
Python
3
star
18

Record-and-Email-Voice-Note

Jupyter Notebook
3
star
19

FLASK-Resume-Python

It is the first website i developed using FLASK python javascript, bootstrap, CSS.
JavaScript
3
star
20

Single-Page-Applications

Convert multi page applications into single page app so it can be more efficient (only basics).Python Flask/Javascript ES6/ HTML5 historical API
HTML
3
star
21

rawheel

Profile README
2
star
22

Django-Polls-App

Python
2
star
23

MyUnfollowersApi-GitHub

The API returns GitHub new followers & unfollowers. ๐Ÿ’€
Python
2
star
24

Django-REST-API-Serialization

Python
2
star
25

Instagram-followers-scraper

Python
2
star
26

TODOO-APP-FLASK

A simple to do app using python flask web framework with HTML 5 and Javascript (ES6).
HTML
2
star
27

PyTroops-repo

this is the test repository for tutorial
Python
2
star
28

Django-User-Management-System

UMS allows you to add Roles, Rights and assign them to a particular user.
Python
2
star