Last active
March 13, 2021 20:08
-
-
Save samirsaci/fdc920a158ea9dd173234e8e4e2c869b to your computer and use it in GitHub Desktop.
Flask API Google Maps
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
from flask import Flask, render_template, request, redirect | |
app = Flask(__name__) | |
# Home Page | |
@app.route('/') | |
def index(): | |
return render_template('index.html') | |
# Distance Page | |
@app.route('/distance/<fr>/<to>', methods=['GET', 'POST']) | |
def distance(fr, to): | |
#selenium bot function returns result | |
result = from_to(fr, to) | |
return result | |
if __name__ == '__main__': | |
# Threaded option to enable multiple instances for multiple user access support | |
app.run(debug=True, port=5000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment