formaptix-server/database/__init__.py

16 lines
348 B
Python
Raw Normal View History

2024-08-08 22:14:02 +03:00
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
2024-08-10 17:01:34 +03:00
from .user import User
2024-08-12 16:57:40 +03:00
from .form import Form
2024-08-15 21:01:01 +03:00
from .answer import Answer