Newer
Older
"""This is the PWS application initializer."""
Carlos Colin
committed
from fastapi import FastAPI
def create_app() -> FastAPI:
"""Initialize and configure the FastAPI application.
Returns:
FastAPI: The configured and initialized FastAPI application.
"""
Carlos Colin
committed
app = FastAPI()
print("hello")
Carlos Colin
committed
return app
app = create_app()
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}