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
2024-09-22 11:34:48 +03:00
engine = create_async_engine(settings.DATABASE)
2024-08-08 22:14:02 +03:00
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