mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-02-19 07:27:10 -05:00
This PR enables the ruff rule for return type annotations (ANN), and adds the ty package for type checking.
20 lines
475 B
Python
20 lines
475 B
Python
import os
|
|
|
|
from app.tmdb import router as tmdb_router
|
|
from app.tvdb import router as tvdb_router
|
|
from fastapi import FastAPI
|
|
from starlette_exporter import PrometheusMiddleware, handle_metrics
|
|
|
|
app = FastAPI(root_path=os.getenv("BASE_PATH", ""))
|
|
|
|
app.add_middleware(PrometheusMiddleware)
|
|
app.add_route("/metrics", handle_metrics)
|
|
|
|
app.include_router(tmdb_router)
|
|
app.include_router(tvdb_router)
|
|
|
|
|
|
@app.get("/")
|
|
async def root() -> dict:
|
|
return {"message": "Hello World"}
|