[Avg. reading time: 2 minutes]
Flask Demo - 02
CRUD stands for Create, Read, Update, and Delete. These are the four basic operations of persistent storage in software development.
uv run python api_demo/flask_02_crud_app.py
or
poetry run python api_demo/flask_02_crud_app.py
Create a new Item
curl -X POST -H "Content-Type: application/json" -d '{"name":"item 99"}' http://127.0.0.1:5002/items
Update Existing Item
curl -X PUT -H "Content-Type: application/json" -d '{"id":3,"name":"item 3"}' http://127.0.0.1:5002/items/3
Delete Existing Item
curl -X DELETE http://127.0.0.1:5002/items/3