Skip to content

Instantly share code, notes, and snippets.

@nenodias
Created August 9, 2022 02:31
Show Gist options
  • Save nenodias/abd89ed5bb472d5492edb221b833e329 to your computer and use it in GitHub Desktop.
Save nenodias/abd89ed5bb472d5492edb221b833e329 to your computer and use it in GitHub Desktop.
Flask app without using decorator with @
from flask import Flask
app = Flask(__name__)
def hello():
return "Hello world"
app.route("/", methods=['get'])(hello)
app.run()
@eirnym
Copy link

eirnym commented Jan 29, 2025

@nihat-js
Copy link

nihat-js commented Mar 9, 2025

I like this syntax more than decorator based syntax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment