Developing RESTful APIs with Python and Flask

PHOTO EMBED

Thu Mar 03 2022 07:16:46 GMT+0000 (UTC)

Saved by @morristech #bash

# start the cashman application
./bootstrap.sh &

# get incomes
curl http://localhost:5000/incomes

# add new income
curl -X POST -H "Content-Type: application/json" -d '{
  "description": "lottery",
  "amount": 1000.0
}' http://localhost:5000/incomes

# check if lottery was added
curl localhost:5000/incomes
content_copyCOPY

https://auth0.com/blog/developing-restful-apis-with-python-and-flask/