Skip to content
Snippets Groups Projects
main.py 516 B
Newer Older
  • Learn to ignore specific revisions
  • """This is the PWS application initializer."""
    
    
    def create_app() -> FastAPI:
        """Initialize and configure the FastAPI application.
    
        Returns:
            FastAPI: The configured and initialized FastAPI application.
        """
    
    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}