Coverage for src/pyrf_api/app.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-09-06 21:54 +0000

1"""FastAPI app and exception handlers.""" 

2 

3from fastapi import FastAPI 

4 

5from .exceptions import register_exception_handlers 

6from .routes.market import router as market_router 

7 

8app = FastAPI(title="pyrf API", version="0.4.0") 

9 

10register_exception_handlers(app) 

11 

12app.include_router(market_router, prefix="/api/v1") 

13 

14 

15@app.get("/health") 

16def health() -> dict[str, str]: 

17 """Health check (no auth required).""" 

18 return {"status": "ok"}