[Python] How to implement a transactional decorator in FastAPI + SQLAlchemy - with reviewing other approaches

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • fastapi-boilerplate

    FastAPI boilerplate for real world production (by teamhide)

  • 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()

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • A Convenient Ensembled Perplexity API

    1 project | news.ycombinator.com | 2 May 2024
  • My first code as a beginner!!

    1 project | dev.to | 2 May 2024
  • NPi – An Open Source project for enhancing AI Agents in taking action

    4 projects | news.ycombinator.com | 2 May 2024
  • Recapping the AI, Machine Learning and Data Science Meetup — May 2, 2024

    2 projects | dev.to | 2 May 2024
  • THOR: Tracklet-Less Heliocentric Orbit Recovery

    1 project | news.ycombinator.com | 2 May 2024