Skip to content

Instantly share code, notes, and snippets.

@toshimasa-nanaki
Created November 16, 2017 14:32
Show Gist options
  • Save toshimasa-nanaki/b7fba6828705984f38b861db7b80cd11 to your computer and use it in GitHub Desktop.
Save toshimasa-nanaki/b7fba6828705984f38b861db7b80cd11 to your computer and use it in GitHub Desktop.
Hello World API Python
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
name = "This is the route."
return name
@app.route('/hello')
def hello():
name = "Hello world!"
return name
if __name__ == "__main__":
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment