fastapi-boilerplate
FastAPI-template
fastapi-boilerplate | FastAPI-template | |
---|---|---|
1 | 3 | |
880 | 1,659 | |
- | - | |
6.7 | 6.7 | |
16 days ago | 5 months ago | |
Python | Python | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fastapi-boilerplate
-
[Python] How to implement a transactional decorator in FastAPI + SQLAlchemy - with reviewing other approaches
from typing import Optional from contextvars import ContextVar from sqlalchemy.ext.asyncio import ( create_async_engine, async_scoped_session, async_sessionmaker, AsyncSession, ) from ..config import config # some hints from: https://github.com/teamhide/fastapi-boilerplate/blob/master/core/db/session.py db_session_context: ContextVar[Optional[int]] = ContextVar( "db_session_context", default=None ) engine = create_async_engine(url=config.DB_URL) def get_db_session_context() -> int: session_id = db_session_context.get() if not session_id: raise ValueError("Currently no session is available") return session_id def set_db_session_context(*, session_id: int) -> None: db_session_context.set(session_id) AsyncScopedSession = async_scoped_session( session_factory=async_sessionmaker(bind=engine, autoflush=False, autocommit=False), scopefunc=get_db_session_context, ) def get_current_session() -> AsyncSession: return AsyncScopedSession()
FastAPI-template
-
Do you recommend any FastAPI SaaS Strater-kit?
I'm pretty partial to s3rius's template boiler plate. Used it while contracting a while back and it just tackled everything I'd want for the first few months leaving me time to focus on CRUD / business logic instead of Devops stuff. Do wish it used ruff but that was an ultra easy swap.
-
Fastapi minimal starter template
I found myself rebuilding a lot of basic stuff such as sign up, login, async database functionality and unit tests every time I wanted to quickly POC something. Now I like to keep things simple and customisable when starting and thus usually don't opt for using one of the already existing templates (such as this great generator: https://github.com/s3rius/FastAPI-template) since I feel I spend more time cutting stuff out I don't need.
- Show HN: Lightweight FastAPI Project Generator
What are some alternatives?
FastAPI-Production-Boilerplate - A scalable and production ready boilerplate for FastAPI
fastapi-admin - A fast admin dashboard based on FastAPI and TortoiseORM with tabler ui, inspired by Django admin
FastAPI-boilerplate - An extendable async API using FastAPI, Pydantic V2, SQLAlchemy 2.0, PostgreSQL and Redis.
cookiecutter-data-science - A logical, reasonably standardized, but flexible project structure for doing and sharing data science work.
fastapi-template - FastAPI template
pydantic-factories - Simple and powerful mock data generation using pydantic or dataclasses
warp_fastapi - Create FastAPI app with warp speed.
cookiecutter-django-wagtail - Cookiecutter Django + Wagtail
fastapi-layered-architecture - FastAPI Layered Architecture
wolt-python-package-cookiecutter - Cookiecutter for rapidly creating modern & high-quality Python packages
flask-graphql-boilerplate - a flask boilerplate to get you up and running. Packed with GraphQL and an authentication system out of the box.
cookiecutter-qt-app - A cookiecutter to create Qt applications, with translations and packaging