fastapi-boilerplate

FastAPI boilerplate for real world production (by teamhide)

Fastapi-boilerplate Alternatives

Similar projects and alternatives to fastapi-boilerplate based on common topics and language

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better fastapi-boilerplate alternative or higher similarity.

fastapi-boilerplate reviews and mentions

Posts with mentions or reviews of fastapi-boilerplate. We have used some of these posts to build our list of alternatives and similar projects.
  • [Python] How to implement a transactional decorator in FastAPI + SQLAlchemy - with reviewing other approaches
    1 project | dev.to | 29 May 2023
    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()

Stats

Basic fastapi-boilerplate repo stats
1
866
6.8
8 days ago
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com