Python – Make a simple API with Flask and Postman

Flask is actually really a powerful tool for making an API. In the video below, you would see how quickly I am building an API, that does four really simple functions.

A view from my a nice Friday.

The functions are – saying “Hello”, multiplying a number by itself 2 times (e.g. cubing a number), concatenating 2 strings and just returning twice any given string. Nothing fancy, but if this is the first time you are seeing Flask, API and Python I hope it would be useful!

Additionally, there are 3 tests for the “cube” function:

To run the tests, enter in the terminal python

To run the API, enter in the terminal python

And I hope you have enjoyed the video! 🙂

Tagged with: , , , ,