flama icon indicating copy to clipboard operation
flama copied to clipboard

Shortcuts for generating routes based on http verbs

Open perdy opened this issue 3 years ago • 0 comments

It would be desirable to allow creating routes like this:

@app.get("/foo/")
def foo():
    return {"message": "foo"}

as a shortcut for:

@app.route("/foo/", methods=["GET"])
def foo():
    return {"message": "foo"}

perdy avatar Jan 12 '22 15:01 perdy