HTTP API client for Taskdog server
Project description
taskdog-client
HTTP API client library for Taskdog server.
Overview
This package provides a type-safe HTTP client for communicating with the Taskdog API server. It handles authentication, error mapping, and response conversion to domain DTOs.
Use cases:
- Building custom CLI tools
- Integrating Taskdog with other systems
- Creating automated workflows
- Testing API endpoints
Installation
pip install taskdog-client
For development:
pip install -e ".[dev]"
Client Classes
| Client | Purpose |
|---|---|
TaskClient |
Task CRUD operations (create, update, delete, archive) |
LifecycleClient |
Status changes (start, complete, pause, cancel, reopen) |
RelationshipClient |
Dependencies and tags |
QueryClient |
List tasks, get task details |
AnalyticsClient |
Statistics and Gantt data |
NotesClient |
Task notes (markdown) |
AuditClient |
Audit log access |
BaseApiClient |
Base class with common HTTP logic |
Usage Example
from taskdog_client import TaskClient, LifecycleClient, QueryClient
# Create clients
base_url = "http://127.0.0.1:8000"
api_key = "your-api-key" # Optional, for authenticated servers
task_client = TaskClient(base_url, api_key)
lifecycle_client = LifecycleClient(base_url, api_key)
query_client = QueryClient(base_url, api_key)
# Create a task
task = task_client.create_task(
name="My Task",
priority=100,
estimated_duration=8.0,
tags=["backend"]
)
print(f"Created task: {task.id}")
# List tasks
tasks = query_client.list_tasks(status="pending")
for t in tasks:
print(f"- {t.name} (ID: {t.id})")
# Start a task
lifecycle_client.start_task(task.id)
# Complete a task
lifecycle_client.complete_task(task.id)
Error Handling
Clients raise exceptions from taskdog_core.domain.exceptions:
from taskdog_core.domain.exceptions import TaskNotFoundException, TaskValidationError
try:
task_client.get_task(999)
except TaskNotFoundException:
print("Task not found")
except TaskValidationError as e:
print(f"Validation error: {e}")
Configuration
Clients accept optional configuration:
from taskdog_client import TaskClient
# Basic usage (no auth)
client = TaskClient("http://127.0.0.1:8000")
# With API key authentication
client = TaskClient(
base_url="http://127.0.0.1:8000",
api_key="your-secret-key"
)
# Custom timeout (in seconds)
client = TaskClient(
base_url="http://127.0.0.1:8000",
timeout=30.0
)
Dependencies
taskdog-core: Domain DTOs and exceptionshttpx: HTTP client library
Related Packages
- taskdog-core: Domain DTOs used by this package
- taskdog-server: API server this client connects to
- taskdog-ui: CLI/TUI that uses this client
- taskdog-mcp: MCP server that uses this client
Testing
pytest tests/
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file taskdog_client-0.19.0.tar.gz.
File metadata
- Download URL: taskdog_client-0.19.0.tar.gz
- Upload date:
- Size: 33.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
326abf9240b0c40a72435ade8c575c733595650d87136fa6e2c6d3e7c1467b74
|
|
| MD5 |
a983a8b7ae32d627e420ea28ab9c7659
|
|
| BLAKE2b-256 |
3114602f4d3496304bd7bf062334a4536b3ec9d98d457e32afda79875243818a
|
Provenance
The following attestation bundles were made for taskdog_client-0.19.0.tar.gz:
Publisher:
release.yml on Kohei-Wada/taskdog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taskdog_client-0.19.0.tar.gz -
Subject digest:
326abf9240b0c40a72435ade8c575c733595650d87136fa6e2c6d3e7c1467b74 - Sigstore transparency entry: 1436729290
- Sigstore integration time:
-
Permalink:
Kohei-Wada/taskdog@4ed1c1f6592b04ffb8e886829019e2a4651119bb -
Branch / Tag:
refs/tags/v0.19.0 - Owner: https://github.com/Kohei-Wada
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4ed1c1f6592b04ffb8e886829019e2a4651119bb -
Trigger Event:
push
-
Statement type:
File details
Details for the file taskdog_client-0.19.0-py3-none-any.whl.
File metadata
- Download URL: taskdog_client-0.19.0-py3-none-any.whl
- Upload date:
- Size: 30.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cd7173f28ab0a24583ea4a458dde2ebfd8acc42884ae6be734e9fcc2723e872
|
|
| MD5 |
79758904485ea0b93646080c3ca6c8f4
|
|
| BLAKE2b-256 |
950a1a2c4e111aa9144d5d3bba3ae8106a1ff72dbb0a3ba489f6499c43522a0c
|
Provenance
The following attestation bundles were made for taskdog_client-0.19.0-py3-none-any.whl:
Publisher:
release.yml on Kohei-Wada/taskdog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taskdog_client-0.19.0-py3-none-any.whl -
Subject digest:
0cd7173f28ab0a24583ea4a458dde2ebfd8acc42884ae6be734e9fcc2723e872 - Sigstore transparency entry: 1436729379
- Sigstore integration time:
-
Permalink:
Kohei-Wada/taskdog@4ed1c1f6592b04ffb8e886829019e2a4651119bb -
Branch / Tag:
refs/tags/v0.19.0 - Owner: https://github.com/Kohei-Wada
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4ed1c1f6592b04ffb8e886829019e2a4651119bb -
Trigger Event:
push
-
Statement type: