A simple ToDo API built with FastAPI to learn Python web development.
👉 TypeScript/Ruby on Rails経験者向け学習ガイド: LEARNING_GUIDE.md
📝 演習問題(穴埋め形式): EXERCISES_README.md
- RESTful API with CRUD operations for ToDo items
- Data validation with Pydantic
- Simple in-memory database (for learning purposes)
- Async request handling
- Python 3.8+
- FastAPI
- Uvicorn
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On macOS/Linux
source venv/bin/activate
# On Windows
# venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run development server
uvicorn app.main:app --reloadOnce the server is running, you can:
- Access the interactive API documentation at http://localhost:8000/docs
- Run the test script to verify all endpoints:
python test_api.py
GET /todos- List all ToDo itemsGET /todos/{id}- Get a single ToDo itemPOST /todos- Create a new ToDo itemPUT /todos/{id}- Update a ToDo itemDELETE /todos/{id}- Delete a ToDo item