2023-07-02 20:18:29 +08:00
|
|
|
from sqlalchemy.ext.asyncio import async_sessionmaker, create_async_engine
|
|
|
|
|
2023-07-03 01:03:54 +08:00
|
|
|
db_url = "postgresql+asyncpg://together:togetherno.1@localhost/together"
|
2023-07-02 20:18:29 +08:00
|
|
|
engine = create_async_engine(db_url, echo=True)
|
|
|
|
async_session = async_sessionmaker(engine, expire_on_commit=False)
|
|
|
|
|