Core business logic and infrastructure for Taskdog
Project description
taskdog-core
Core business logic and infrastructure for Taskdog task management system.
Overview
This package contains the core components shared by both the Taskdog server and UI:
- Domain Layer: Business entities, domain services, and interfaces
- Application Layer: Use cases, queries, DTOs, and business logic orchestration
- Infrastructure Layer: Persistence implementations, external service integrations
- Controllers: Business logic orchestrators used by presentation layers
Installation
pip install taskdog-core
For development:
pip install -e ".[dev]"
Architecture
Follows Clean Architecture principles:
Domain (entities, services, repositories)
↑
Application (use cases, queries, DTOs)
↑
Infrastructure (SQLite, file storage)
↑
Controllers (orchestration layer)
Key Components
Domain Layer (taskdog_core/domain/):
Task- Core entity with status, priority, deadlines, dependenciesTaskStatus- PENDING, IN_PROGRESS, COMPLETED, CANCELEDTimeTracker- Records actual_start/actual_end timestampsTaskNotFoundException,TaskValidationError- Domain exceptions
Application Layer (taskdog_core/application/):
- Use Cases: CreateTaskUseCase, StartTaskUseCase, OptimizeScheduleUseCase, etc.
- Validators: TaskFieldValidatorRegistry with Status and Dependency validators
- Services: WorkloadAllocator, OptimizationSummaryBuilder, TaskQueryService
- Optimization: 9 scheduling strategies (greedy, balanced, backward, priority_first, earliest_deadline, round_robin, dependency_aware, genetic, monte_carlo)
Infrastructure Layer (taskdog_core/infrastructure/):
SqliteTaskRepository- SQLite persistence with transactional writesSqliteNotesRepository- Database-based notes storageConfigManager- TOML configuration loading
Controllers (taskdog_core/controllers/):
TaskCrudController- Create, update, delete operationsTaskLifecycleController- Start, complete, pause, cancel, reopenTaskRelationshipController- Dependencies and tagsTaskAnalyticsController- Statistics and optimizationQueryController- Read-only operations
Usage Example
from taskdog_core.domain.entities.task import Task, TaskStatus
from taskdog_core.infrastructure.persistence.database.sqlite_task_repository import SqliteTaskRepository
from taskdog_core.controllers.task_crud_controller import TaskCrudController
from taskdog_core.infrastructure.config.config_manager import ConfigManager
from taskdog_core.shared.utils.logger import StandardLogger
# Setup
repository = SqliteTaskRepository("sqlite:///tasks.db")
config = ConfigManager()
logger = StandardLogger("example")
# Create controller
crud_controller = TaskCrudController(repository, config, logger)
# Create a task
from taskdog_core.application.dto.task_request import CreateTaskRequest
request = CreateTaskRequest(name="My Task", priority=100)
task = crud_controller.create_task(request)
Dependencies
holidays: Holiday checking for schedulingpython-dateutil: Date/time utilitiessqlalchemy: Database ORM
Related Packages
- taskdog-server: FastAPI REST API server using this package
- taskdog-ui: CLI and TUI interfaces using this package
- taskdog-client: HTTP client library for API access
For detailed architecture documentation, see CLAUDE.md.
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_core-0.18.5.tar.gz.
File metadata
- Download URL: taskdog_core-0.18.5.tar.gz
- Upload date:
- Size: 118.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0457358e46b54a9689d56cda8f7b2c8105959ea7b310a3ff2d8bee3607093c7
|
|
| MD5 |
80ed4d96b1c6e09ba4299b9ca23e1d51
|
|
| BLAKE2b-256 |
29740cb5df625fa74568e5c69247899da7141e124b88b73387394f84da8c4c64
|
Provenance
The following attestation bundles were made for taskdog_core-0.18.5.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_core-0.18.5.tar.gz -
Subject digest:
d0457358e46b54a9689d56cda8f7b2c8105959ea7b310a3ff2d8bee3607093c7 - Sigstore transparency entry: 1247143071
- Sigstore integration time:
-
Permalink:
Kohei-Wada/taskdog@0eb55660c7dcd0be9f8defe3cff7bfb16b1a88a4 -
Branch / Tag:
refs/tags/v0.18.5 - Owner: https://github.com/Kohei-Wada
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0eb55660c7dcd0be9f8defe3cff7bfb16b1a88a4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file taskdog_core-0.18.5-py3-none-any.whl.
File metadata
- Download URL: taskdog_core-0.18.5-py3-none-any.whl
- Upload date:
- Size: 198.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dff52b57c36de5d6ab57d33ee5bc73f316c7bb894acf546b848039942194cc4
|
|
| MD5 |
dae346927203994706609d269007b38a
|
|
| BLAKE2b-256 |
089f2c03d7c987ca4553b5f72f1812a42880f661d6e0fccff6fe3112949cbf11
|
Provenance
The following attestation bundles were made for taskdog_core-0.18.5-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_core-0.18.5-py3-none-any.whl -
Subject digest:
5dff52b57c36de5d6ab57d33ee5bc73f316c7bb894acf546b848039942194cc4 - Sigstore transparency entry: 1247143076
- Sigstore integration time:
-
Permalink:
Kohei-Wada/taskdog@0eb55660c7dcd0be9f8defe3cff7bfb16b1a88a4 -
Branch / Tag:
refs/tags/v0.18.5 - Owner: https://github.com/Kohei-Wada
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0eb55660c7dcd0be9f8defe3cff7bfb16b1a88a4 -
Trigger Event:
push
-
Statement type: