REST API using python and flask. Data stored in mongodb
mkvirtualenv python-flask-mongodb
workon python-flask-mongodbpip3 install -r requirements.txtmongodmongo
use python_flask_mongodbpython3 application.pyhttp://127.0.0.1:5000/curl -XPOST http://localhost:5000/api/v1/user -H "Content-Type: application/json" -d '{
"name": "Abhinayak Swar",
"location": "Nepal"
}'curl -XPOST http://localhost:5000/api/v1/user -H "Content-Type: application/json" -d '[
{
"name": "Atul Pradhan",
"location": "Nepal"
},
{
"name": "Pramod Sthapit",
"location": "Nepal"
}
]'curl -XGET http://localhost:5000/api/v1/usercurl -XPUT http://localhost:5000/api/v1/user/{user_id} -H "Content-Type: application/json" -d '{
"name": "Abhinayak Swar 123",
"location": "Nepal"
}'curl -XDELETE http://localhost:5000/api/v1/user/{user_id}