Skip to main content

A simple todo list REST API

Project description

Todo List REST API

A simple todo list application with REST endpoints and a web dashboard.

Installation

pip install todo-rest

Running the App

After installation, you can run the app with the installed command:

todo-rest

Or using the development commands:

uv run python main.py

Or with uvicorn directly (with auto-reload for development):

uv run uvicorn todo_rest.app:app --reload

The API will be available at http://localhost:8000

CLI Options

You can add artificial latency to all API requests for testing purposes:

todo-rest --latency 500

This adds a 500ms delay to all responses. Useful for testing loading states and timeouts in client applications.

Dashboard

Open http://localhost:8000 in your browser to view the todo dashboard. The dashboard shows:

  • Total tasks, completed, and pending counts
  • All todos with their status
  • Auto-refreshes every 5 seconds

API Endpoints

Get all todos

GET /todos

Get a specific todo

GET /todos/{id}

Create a new todo

POST /todos
Content-Type: application/json

{
  "title": "Buy groceries",
  "description": "Milk, eggs, bread",
  "completed": false
}

Update a todo

PUT /todos/{id}
Content-Type: application/json

{
  "title": "Buy groceries",
  "description": "Milk, eggs, bread, cheese",
  "completed": true
}

Delete a todo

DELETE /todos/{id}

Interactive API Documentation

FastAPI provides automatic interactive documentation:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

todo_rest-0.2.0.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

todo_rest-0.2.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file todo_rest-0.2.0.tar.gz.

File metadata

  • Download URL: todo_rest-0.2.0.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for todo_rest-0.2.0.tar.gz
Algorithm Hash digest
SHA256 08a7627f6f1b34b0e219102108c1d4b057f4b2f30bd21bdb13dbb50b2cc22242
MD5 6ff4583fc1e65094331b664206870767
BLAKE2b-256 c49e5af1a72d40bb8d752ba31003abc708f9f9f1b90f2278dd44a34a8ed84b42

See more details on using hashes here.

File details

Details for the file todo_rest-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: todo_rest-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for todo_rest-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e783647ba48e3926f03257241ff243426e03260860c18f04964350e15d6b2812
MD5 9ed62e48e44d22f80956956e0dc6ee0b
BLAKE2b-256 585eda015d36f39024ba2d44c43236adb5c0313a72c92287d8fa084a322f4ed4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page