FastAPI server for Taskdog task management system.
This package provides a REST API for all Taskdog functionality including:
- Task CRUD operations
- Task lifecycle management (start, complete, pause, cancel, reopen)
- Task relationships (dependencies, tags)
- Time tracking and logging
- Schedule optimization
- Statistics and analytics
- WebSocket real-time updates
pip install taskdog-serverFor development:
pip install -e ".[dev]"Start the server:
taskdog-serverWith custom options:
taskdog-server --host 0.0.0.0 --port 3000Development mode with auto-reload:
taskdog-server --reloadOnce the server is running, visit:
- Interactive API docs: http://localhost:8000/docs
- Alternative docs: http://localhost:8000/redoc
- Health check: http://localhost:8000/health
For complete API reference, see API Guide.
Configure API key authentication in ~/.config/taskdog/server.toml:
[auth]
enabled = true
[[auth.api_keys]]
name = "my-client"
key = "your-secret-key"Clients authenticate via X-Api-Key header:
curl -H "X-Api-Key: your-secret-key" http://localhost:8000/api/v1/tasks/See Authentication Documentation for details.
Connect to /ws for real-time task notifications:
const ws = new WebSocket('ws://localhost:8000/ws?token=your-api-key');
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('Event:', data.type); // task_created, task_updated, etc.
};Event types:
task_created- New task createdtask_updated- Task fields updatedtask_deleted- Task deletedtask_status_changed- Task status changedschedule_optimized- Schedule optimization completed
Note: WebSocket uses an in-memory connection manager, so the server always runs as a single process.
Server configuration: ~/.config/taskdog/server.toml
[auth]
enabled = true
[[auth.api_keys]]
name = "my-client"
key = "your-secret-key"
[audit]
enabled = falseCore configuration: ~/.config/taskdog/core.toml
[region]
country = "JP"See Configuration Guide for all options.
The server uses:
- FastAPI: Modern, fast web framework
- Pydantic: Data validation with type hints
- uvicorn: ASGI server
- taskdog-core: Core business logic and infrastructure
tasks.py- Task CRUD operationslifecycle.py- Task status changesrelationships.py- Dependencies and tagsanalytics.py- Statistics and reportingnotes.py- Markdown noteswebsocket.py- Real-time updates
Controllers are injected via FastAPI dependencies:
CrudControllerDep = Annotated[TaskCrudController, Depends(get_crud_controller)]- taskdog-core: Core business logic used by this package
- taskdog-ui: CLI and TUI interfaces connecting to this server
- taskdog-client: HTTP client library for API access
- taskdog-mcp: MCP server for Claude Desktop integration
pytest tests/systemctl --user start taskdog-server
systemctl --user enable taskdog-serverdocker pull ghcr.io/kohei-wada/taskdog-server:main
docker run -d -p 8000:8000 -v taskdog-data:/data ghcr.io/kohei-wada/taskdog-server:mainSee contrib/README.md for deployment details.
MIT