Last active
February 5, 2023 02:47
-
-
Save amalgjose/aca9d165d30214943e20e367cb9ab56e to your computer and use it in GitHub Desktop.
Sample python flask web service (RESTful service). This has only one endpoint (GET)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/requestme", methods = ["GET"]) | |
def hello(): | |
response = {"message":"Hello Flask.!!"} | |
return json.dumps(response) | |
if __name__ == '__main__': | |
app.run(host="0.0.0.0", port=9090, debug=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment