from fastapi import FastAPI # Create a FastAPI app instance app = FastAPI() # Define the root endpoint @app.get("/") def read_root(): return {"message": "Hello World"}