Buckets:

download
raw
472 Bytes
from __future__ import annotations
from collections.abc import Generator
from sqlalchemy import create_engine
from sqlalchemy.orm import Session, sessionmaker
from .config import settings
engine = create_engine(settings.database_url, future=True)
SessionLocal = sessionmaker(bind=engine, autoflush=False, autocommit=False, future=True)
def get_db() -> Generator[Session, None, None]:
db = SessionLocal()
try:
yield db
finally:
db.close()

Xet Storage Details

Size:
472 Bytes
·
Xet hash:
bd82562f75817c17e4d132ca0ee9edc5e6b1e829bf13e2debec24b2ded506eaa

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.