hello-world flask skeleton
sudo pip3 install netifaces
sudo apt-get install python3-flask
python3 hello.py eth0 5555
virtualenv helloflask source helloflask/bin/activate cd helloflask pip3 freeze > requirements.txt pip3 install -r requirements.txt
$ curl -d '' -H "Content-Type: application/json" -X POST http://192.168.3.195:5555/somepath | python -m json.tool
{
"results": {
"status": "fail"
}
}
$ curl -d '{"x":"y"}' -H "Content-Type: application/json" -X POST http://192.168.3.195:5555/somepath | python -m json.tool
{
"results": {
"input": {
"x": "y"
},
"status": "succ"
}
}