Skip to content

Instantly share code, notes, and snippets.

@leolanese
Created January 4, 2024 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leolanese/9b77fb3dbe6279631f1e4deb68d50cc1 to your computer and use it in GitHub Desktop.
Save leolanese/9b77fb3dbe6279631f1e4deb68d50cc1 to your computer and use it in GitHub Desktop.
Quick Python API using web framework Flask
from flask import Flask, jsonify
app = Flask(__name__)
@app.route('/api/intro')
def intro():
return jsonify(message='Hello, World!')
if __name__ == '__main__':
app.run(debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment