Fastapi Boilerplate

screenshot of Fastapi Boilerplate

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

Overview

This product is a production-ready FastAPI CRUD backend app that can be easily set up and run with the help of Docker and docker-compose. It follows a similar code structure to Django and provides features such as local dockerized database, migrations, serializers, ORM, CRUD APIs, token authentication, logging mechanism, and test cases implemented with Pytest. The project also utilizes Alembic for database migrations, SQLAlchemy for ORM, Pydantic for typing or serialization, Poetry for dependency management and packaging, Docker and docker-compose for virtualization, PostgreSQL for the database, and PgAdmin for interacting with the Postgres database sessions. With this setup, users can get the application up and running in just 5 minutes.

Features

  • Production ready with one docker-compose command: Enables quick and easy setup of the production environment.
  • Similar to Django Code Structure: Provides a familiar code structure for developers who are already familiar with Django.
  • Local dockerized db: Sets up a local dockerized database for local development and testing.
  • Dockerized PgAdmin to check the db records: Includes a dockerized PgAdmin tool to easily view and manage the database records.
  • Migrations, Serializers and ORM configured: Configures database migrations, serializers, and ORM for seamless data management.
  • CRUD APIs (Sneaker App): Implements CRUD APIs for the Sneaker App.
  • Token Authentication: Enables token-based authentication for secure access to the APIs.
  • Logging Mechanism: Provides an easy-to-use logging mechanism for error tracking and debugging.
  • Testcases TDD with Pytest: Implements test cases following the Test-Driven Development (TDD) approach using Pytest.
  • Seperate Database(Sqlite) and mock session configured for test cases: Sets up a separate database (Sqlite) and mock session for running test cases.
  • Poetry dependency management and packaging made easy: Utilizes Poetry for managing dependencies and package management, providing an improved alternative to pip.

Summary

This product offers a ready-to-use FastAPI CRUD backend app that can be quickly set up and run using Docker and docker-compose. It provides features such as a similar code structure to Django, local dockerized database, migrations, serializers, ORM, CRUD APIs, token authentication, logging mechanism, and test cases. With the use of technologies like Alembic, SQLAlchemy, Pydantic, Pytest, Poetry, Docker, and PostgreSQL, developers can easily develop, test, and deploy their FastAPI applications.

docker
Docker

A website that uses Docker for containerization to streamline development, testing, and deployment workflows. This includes features such as containerization of dependencies, automated builds and deployments, and container orchestration to ensure scalability and availability.