benavlabs /
FastAPI-boilerplate
An extendable async API using FastAPI, Pydantic V2, SQLAlchemy 2.0, PostgreSQL and Redis.
91/100 healthLoading repository data…
Hunnyjain7 / repository
A FastApi Boilerplate for Production
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
fastapi-production-boilerplate
┣ project
┃ ┣ alembic
┃ ┃ ┣ versions
┃ ┃ ┣ env.py
┃ ┃ ┣ README
┃ ┃ ┗ script.py.mako
┃ ┣ common
┃ ┃ ┣ auth.py
┃ ┃ ┗ utility.py
┃ ┣ constant
┃ ┃ ┗ status_constant.py
┃ ┣ database
┃ ┃ ┗ database.py
┃ ┣ endpoints
┃ ┃ ┣ admin_app
┃ ┃ ┃ ┣ authentication.py
┃ ┃ ┃ ┗ __init__.py
┃ ┃ ┣ client_app
┃ ┃ ┃ ┣ client_authentication.py
┃ ┃ ┃ ┗ __init__.py
┃ ┃ ┗ __init__.py
┃ ┣ media
┃ ┃ ┣ excels
┃ ┃ ┃ ┗ user_excels
┃ ┃ ┗ images
┃ ┃ ┗ profile_pics
┃ ┣ models
┃ ┃ ┣ cli_client.py
┃ ┃ ┗ usr_user.py
┃ ┣ routes
┃ ┃ ┗ api.py
┃ ┣ schemas
┃ ┃ ┃ ┣ login.cpython-310.pyc
┃ ┃ ┃ ┗ register.cpython-310.pyc
┃ ┃ ┣ login.py
┃ ┃ ┗ register.py
┃ ┣ alembic.ini
┃ ┣ test.py
┃ ┗ __init__.py
┣ .env
┣ .env.example
┣ .gitignore
┣ application.py
┣ README.md
┗ requirements.txt
git clone https://github.com/Hunnyjain7/fastapi-production-boilerplate.git
cd fastapi-production-boilerplate
python -m venv env #create a virtual environment
.\env\Scripts\activate #activate your virtual environment
pip install -r requirements.txt
update your database connection string in .env
uvicorn application:app --reload #start server use --host for host if required
visit Welcome screen at 127.0.0.1:8000
visit Swagger UI docs screen at 127.0.0.1:8000/docs # here all api routing and request can be triggered...
* Install alembic
pip install alembic
step 1: cd project then alembic init alembic
step 2: mention your mysql connection string inside sqlalchemy.url
step 3: in env.py file inside alembic dir mention all models inside target_metadata this way
target_metadata = [usr_user.Base.metadata, cli_client.Base.metadata]
step 4: alembic revision --autogenerate -m "message to identify migration"
step 5: now below command will migrate all changes to the database
alembic upgrade head
step 6: whenever you make changes into the models then create the revision and upgrade it, even if you remove fields from the models upgrade command will be used
alembic revision --autogenerate -m "second migration message"
followed by alembic upgrade first three or four initials of your recent version created in my case command was
alembic upgrade 2a43
to downgrade the recent migration simply alembic downgrade first three or four initials of your recent version created in my case command was
alembic downgrade 2a43
Selected from shared topics, language and repository description—not editorial ratings.
benavlabs /
An extendable async API using FastAPI, Pydantic V2, SQLAlchemy 2.0, PostgreSQL and Redis.
91/100 healthjoaoflaviosantos /
A fully asynchronous FastAPI boilerplate. Built for extensibility and speed, it incorporates FastAPI, SQLModel, Alembic, PostgreSQL, Redis, Celery and Locust. 🚀
79/100 healthkaanari-tech /
FastAPI REST boilerplate is a comprehensive starting point for developing robust web applications. It provides a structured foundation equipped with essential features and configurations.
41/100 healthClusterSandbox /
A FastAPI boilerplate with JWT and API-key auth, Redis caching, SQLAlchemy, Alembic migrations, logging, rate-limiting.
57/100 healthShawnaRStaff /
Create SQLAlchemy applications with a single command. Supports FastAPI/Flask/Minimal, PostgreSQL/SQLite/MySQL, with starter kits for auth, blog, and e-commerce projects.
59/100 healthmantle-bearer /
A production-ready FastAPI boilerplate with modern Python development practices, async SQLAlchemy 2.0, Alembic migrations, JWT authentication, and comprehensive tooling.
51/100 health