This repository servers as a template for applications build with FastAPI web framework
I included the whole basic functionality based on my experience most projects used:
- Pipenv with pre-listed libraries;
- Makefile for improving developer experience;
- Docker & Docker Compose;
- Dockerized PostgreSQL;
- Ready-to-use Alembic;
- Ready-to-use SQLAlchemy with CRUDMixin;
- Authentication middleware;
- Caching middleware with Redis;
- RequestService for making external HTTP requests;
- Ready-to-use test environment.
The application uses Python 3.12 and all newest versions as in 2024-10-20.
There are two database declared in the docker-compose.yml file:
- PostgreSQL as a primary database;
- Redis for caching HTTP requests.
- Pipenv
- Docker & Docker Compose
- Make
Create .env file in the project root directory and fill it up according to .env.sample file.
To spin up the whole application, you can enter:
make startTo shut it down, you can enter:
make downNote
When adding a new database model, remember to import it in init.py file.
To display all available commands and their description, you can enter:
make help