SQLModel-boilerplate

An extendable async API using FastAPI, SQLModel, PostgreSQL and Redis.

MIT License

Stars
84
SQLModel-boilerplate - 0.1.0 Latest Release

Published by igorbenav 6 months ago

About

FastAPI boilerplate creates an extendable async API using FastAPI, SQLModel and PostgreSQL:

  • FastAPI: modern Python web framework for building APIs
  • SQLModel: SQL databases in Python, designed for simplicity, compatibility, and robustness.
  • PostgreSQL: The World's Most Advanced Open Source Relational Database
  • Redis: Open source, in-memory data store used by millions as a cache, message broker and more.
  • ARQ Job queues and RPC in python with asyncio and redis.
  • Docker Compose With a single command, create and start all the services from your configuration.
  • NGINX High-performance low resource consumption web server used for Reverse Proxy and Load Balancing.

[!TIP]
If you want the SQLAlchemy + Pydantic version instead, head to Fastapi-boilerplate.

Features

  • ⚡️ Fully async
  • 🚀 SQLModel with Pydantic V2 and SQLAlchemy 2.0 support
  • 🔐 User authentication with JWT
  • 🍪 Cookie based refresh token
  • 🏬 Easy redis caching
  • 👜 Easy client-side caching
  • 🚦 ARQ integration for task queue
  • ⚙️ Efficient and robust queries with fastcrud
  • ⎘ Out of the box offset and cursor pagination support with fastcrud
  • 🛑 Rate Limiter dependency
  • 👮 FastAPI docs behind authentication and hidden based on the environment
  • 🦾 Easily extendable
  • 🤸‍♂️ Flexible
  • 🚚 Easy running with docker compose
  • ⚖️ NGINX Reverse Proxy and Load Balancing
Related Projects