A simple, object-oriented TODO application built with FastAPI, Pydantic, and an in-memory store. This project serves as a starting point for technical interviews, demonstrating best practices in Python API design, object-oriented programming, and dependency management.
- β FastAPI-based REST API
- β Pydantic models with computed properties
- β In-memory storage with a dynamic parent-child TODO relationship
- β
Singleton-based
TodoManagerfor efficient data handling - β
Unit tests with
unittest - β Dynamic child resolution via Pydantic properties
GET /todoβ List all TODOs (including children)POST /todoβ Add a new TODO (optionally linked to a parent)DELETE /todo/{todo_uuid}β Remove a TODO
# Clone the repo
$ git clone https://github.com/Nextpertise/todo-app-interview.git
# Install dependencies
$ poetry install
# Run the FastAPI server
$ cd src
$ poetry run uvicorn main:app --reload
# Run the tests (from the root directory) and set the python path
$ PYTHONPATH=src poetry run pytest