13 lines
368 B
Python
13 lines
368 B
Python
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine
|
|
from sqlalchemy.orm import declarative_base
|
|
|
|
from config import DATABASE_URL
|
|
|
|
engine = create_async_engine(DATABASE_URL, echo=False, future=True)
|
|
|
|
async_session_maker = async_sessionmaker(
|
|
bind=engine, expire_on_commit=False, class_=AsyncSession
|
|
)
|
|
|
|
Base = declarative_base()
|