Buckets:

download
raw
706 Bytes
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine
from sqlalchemy.orm import declarative_base, sessionmaker
from inteliver.config import settings
DATABASE_URL = f"postgresql+asyncpg://{settings.postgres_user}:{settings.postgres_password}@{settings.postgres_host}/{settings.postgres_db}"
# TODO: depending on the setting.app_running_env set the logging level (echo) of engine.
engine = create_async_engine(DATABASE_URL, echo=False)
SessionLocal = sessionmaker(
autocommit=False, autoflush=False, bind=engine, class_=AsyncSession
)
Base = declarative_base()
# async def init_db():
# async with engine.begin() as conn:
# await conn.run_sync(Base.metadata.create_all)

Xet Storage Details

Size:
706 Bytes
·
Xet hash:
6a8bbfc5a82cb2060a885f2f3ed209af9efbf440c72419564cbaf18b72b9f386

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