Giter VIP home page Giter VIP logo

fastapi-boilerplate_poetry's Introduction

๐Ÿฒ 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 build

Step 3

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

fastapi-boilerplate_poetry's People

Contributors

rawheel avatar sebastianmarines 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.