formaptix-server/database/__init__.py
2024-08-10 17:01:34 +03:00

13 lines
298 B
Python

from models import settings
from sqlalchemy.ext.asyncio import create_async_engine, async_sessionmaker
from sqlalchemy.orm import DeclarativeBase
engine = create_async_engine(settings.database)
sessions = async_sessionmaker(engine)
class Base(DeclarativeBase):
pass
from .user import User