Building a Todo App with Flask in Python

python_tutorials

Introduction

In this tutorial, we are going to build an API, or a web service, for a todo app. The API service will be implemented using a REST-based architecture.

Our app will have the following main features:

  • Create an item in the todo list
  • Read the complete todo list
  • Update the items with status as “Not Started”, “In Progress”, or “Complete”
  • Delete the items from the list

What is REST?

REST, or REpresentational State Transfer, is an architectural style for building web services and APIs. It requires the systems implementing REST to be stateless. The client sends a request to the server to retrieve or modify resources without knowing what state the server is in. The servers send the response to the client without needing to know what was the previous communication with the client.

Each request to the RESTful system commonly uses these 4 HTTP verbs:

  • GET: Get a specific resource or a collection of resources
  • POST: Create a new resource
  • PUT: Update a specific resource
  • DELETE: Remove a specific resource

Although others are permitted and sometimes used, like PATCH, HEAD, and OPTIONS.

What is Flask?

Flask is a framework for Python

To finish reading, please visit source site