Buckets:

download
raw
572 Bytes
from __future__ import annotations
from typing import Generator
from sqlalchemy import create_engine
from sqlalchemy.orm import declarative_base
from sqlalchemy.orm import sessionmaker
Base = declarative_base()
SQLALCHEMY_DATABASE_URL = 'sqlite:///./sql_app.db?check_same_thread=False'
engine = create_engine(SQLALCHEMY_DATABASE_URL, echo=True)
SessionLocal = sessionmaker(bind=engine, autocommit=False, autoflush=False)
def get_db() -> Generator[int, float, str]:
db = SessionLocal()
try:
yield db
finally:
db.close()
return 'OK'

Xet Storage Details

Size:
572 Bytes
·
Xet hash:
4d357e88fae466b2e7f2bdcb92022635cdb846e5a8d3ce85f88590767a29a21f

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