from fastapi import FastAPI app = FastAPI() @app.get('/items/{item_id}') def read(item_id: int): return {'id': item_id}