refresh api and tests

This commit is contained in:
qananasikq
2026-05-11 12:46:07 +03:00
parent d9d073641b
commit 2cebb78316
12 changed files with 621 additions and 28 deletions

View File

@@ -1,4 +1,4 @@
# Создание FastAPI-приложения и настройка его жизненного цикла.
# FastAPI-приложение и его жизненный цикл.
from contextlib import asynccontextmanager
@@ -11,8 +11,7 @@ from .routes import cars, health, tasks
@asynccontextmanager
async def lifespan(app: FastAPI):
# Жизненный цикл.
# Таблицы создаются через Alembic-миграции (сервис migrate).
# Таблицы создаются миграциями Alembic.
yield
@@ -36,5 +35,5 @@ def create_app(settings: Settings | None = None) -> FastAPI:
return app
# Экземпляр приложения для запуска через uvicorn.
# Точка входа для uvicorn.
app = create_app()