Build a small task-management API that demonstrates:
TestClientpyproject.tomlGET /healthPOST /auth/registerPOST /auth/loginPOST /tasksGET /tasksGET /tasks/{task_id}PATCH /tasks/{task_id}DELETE /tasks/{task_id}fastapi-demo/
├── app/
│ ├── __init__.py
│ ├── main.py
│ ├── config.py
│ ├── database.py
│ ├── dependencies.py
│ ├── models/
│ │ ├── __init__.py
│ │ ├── task.py
│ │ └── user.py
│ ├── schemas/
│ │ ├── __init__.py
│ │ ├── auth.py
│ │ ├── task.py
│ │ └── user.py
│ ├── routers/
│ │ ├── __init__.py
│ │ ├── auth.py
│ │ ├── health.py
│ │ └── tasks.py
│ └── services/
│ ├── __init__.py
│ ├── auth.py
│ └── tasks.py
├── migrations/
├── tests/
│ ├── conftest.py
│ ├── test_auth.py
│ ├── test_health.py
│ └── test_tasks.py
├── .env.example
├── .gitignore
├── alembic.ini
├── Dockerfile
├── docker-compose.yml
├── pyproject.toml
└── README.md
app/main.py/health endpoint/docs, /redoc, and /openapi.jsonUser and Task modelsDockerfiledocker-compose.yml for local use/api/v1 prefix for versioned endpoints/tasks201 Created after successful creation204 No Content after successful deletion404 Not Found for inaccessible or missing tasksGET /health returns 200 OK/docs.
comments (0)