A path operation associates an HTTP method and a path with a Python function, using decorators such as @app.get or @app.post. The function can be synchronous or async, and its return value is converted to JSON.
Example
@app.get('/hello')
def hello():
return {'message': 'hello'}