Python API With Flask And Postman – Put and Delete Methods

In the previous article, the post and get API methods were presented. In this one, Put and Delete are coming. 🙂

Random picture, not exactly related to Flask and Python.

Well, nothing that fancy, this is how these two methods look like:

And, of course tests are a “must”.

Just make sure that you never create items the same way, by repeating lines, this is an automatic “no-go” in production 🙂

To run the tests, go with pytest

And this is how the tests look, if you are having some additional test, stating that 5=3:

Finally the YouTube video:

Enjoy it!

Tagged with: , , , , ,