import asyncpg from src import config pool: asyncpg.Pool | None = None async def init_db(): global pool pool = await asyncpg.create_pool(dsn=config.DATABASE_URL, min_size=2, max_size=10) async def close_db(): global pool if pool: await pool.close() pool = None