Skip to content

zachariahmiller/python-flask-api-tutorial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Todo List API in Python Flask

This is an interactive tutorial that will teach you how to create an API using the Python Flask framework using Python and Pipenv. Please click here to start the tutorial:

Open in Gitpod

About the project we are going to build

In this tutorial we are going to be building a REST API that exposes 3 endpoints to the internet:

GET /todos
POST /todos
DELETE /todos/<int:position>

GET /todos

Will return the list of all todos like this:

[
    {
        "done": true,
        "label": "Sample Todo 1"
    },
    {
        "done": true,
        "label": "Sample Todo 2"
    }
]

POST /todos

It's going to add a new todo to the list, it will receive the following request body:

{
    "done": true,
    "label": "Sample Todo 1"
}

And return the updated list of todos

DELETE /todos/int:position

It's going to remove one todo based on a given position at the end of the url, and return the updated list of todos.

About

Building an API with Python Flask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 99.6%
  • Dockerfile 0.4%