/
iamstacyok
/
SE_FastAPI_Example
Обзор
Документация
Войти
/
iamstacyok
/
SE_FastAPI_Example
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
1
CI/CD
Аналитика
Безопасность
fix
main.py
27 строк
615 B
KateBel
update: main.py
03 май 2026, 22:09
Верифицирован
03 май 2026, 22:09
a3451d9
Код
Авторство
О чём код?
from fastapi import FastAPI from app.config import get_settings # Получаем настройки settings = get_settings() # Создаём приложение с настройками app = FastAPI( title=settings.app_title, version=settings.app_version, description=settings.app_description ) @app.get("/") def root(): return {"message": f"{settings.app_title} started!"} @app.get("/health") def health_check(): return {"status": "ok"} @app.post("/predict/") def predict(item: dict): # временно, дальше заменим return {"message": "will be implemented"}