Better Programming

Advice for programmers.

Follow publication

Member-only story

CRUD API With Flask and PostgreSQL

Esther Vaati
Better Programming
Published in
6 min readDec 13, 2021

--

Photo by Marvin Meyer on Unsplash

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.

--

--

Esther Vaati
Esther Vaati

Written by Esther Vaati

Get practical JavaScript tips and code snippets delivered to your inbox. Join 1000 + developers who write better code. https://practicaljavascript.substack.com/

Write a response