Flask is a Python microframework, similar to Ruby's Sinatra
from IPython.display import display, Image
Image(filename=r'./Assets/full-stack-python-map.png')
#Image from fullstackpython.com
Data Dictionary
pclass - Passenger Class (1 = 1st; 2 = 2nd; 3 = 3rd)
sex - Sex (0 Female, 1 Male)
age - Age (fractional before 1, xx.5 = estimated)
sibsp - Number of Siblings/Spouses Aboard
parch - Number of Parents/Children Aboard
fare - Passenger Fare
embarked - Port of Embarkation (0 = Cherbourg; 1 = Queenstown; 2 = Southampton)
import requests
import json
url = 'http://localhost:5000/'
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
passenger = {'Pclass': 3, 'Age': 27, 'SibSp': 0, 'Parch': 0, 'Fare' : 7.00, 'Embarked': 2, 'Gender': 1}
post_request = requests.post(url, data = json.dumps(passenger), headers=headers)
print(post_request.text)
You Live :)
I suggest working through http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world on a unix based machine - this will give you a pretty good idea of how web applications are made.
Learn how to put this stuff on a real server with http://www.fullstackpython.com/