Member-only story
CRUD API With Flask and PostgreSQL
Learn how to create and test Flask API

This tutorial will build a Flask CRUD application that allows users to create, read, update, and delete database entries using an API. The API will be able to:
- Add a new pet entry
- View all the pets in the database
- Update details about a pet
- Delete a pet
Prerequisites
You will use the following tools and technologies.
- Python3
- Flask
- Flask-SQLAlchemy
- PostgreSQL
- Postman
What is an API
An API(Application Programming Interface ) is a middleware that communicates between software programs. An API is used to communicate between the client and the database server in an application.
HTTP(Hypertext Transfer Protocol)
Another important concept we need to understand is the HTTP protocol, which will implement the API. The HTTP protocol is the foundation of data communication over the internet. It describes the way data is distributed. The diagram below represents a standard communication using HTTP.