mirror of
https://github.com/github/codeql.git
synced 2026-03-30 20:28:15 +02:00
17 lines
569 B
Python
17 lines
569 B
Python
from flask import Flask, Response, stream_with_context, render_template_string, stream_template_string
|
|
app = Flask(__name__)
|
|
|
|
@app.route("/a") # $ routeSetup="/a"
|
|
def a(): # $ requestHandler
|
|
r = render_template_string("abc") # $ templateConstruction="abc"
|
|
return r # $ HttpResponse
|
|
|
|
@app.route("/b") # $ routeSetup="/b"
|
|
def b(): # $ requestHandler
|
|
s = stream_template_string("abc") # $ templateConstruction="abc"
|
|
r = Response(stream_with_context(s)) # $ HttpResponse
|
|
return r # $ HttpResponse
|
|
|
|
if __name__ == "__main__":
|
|
app.run(debug=True)
|