functualize-tasks
Status: Published — Independently installable from PyPI.
Tasks Domain SDK for the functualize framework. Provides a task management capability
that acts as a mutable planning scratchpad within job execution — create, list, update,
delete, and link tasks with structured event emission on every mutation. Storage is
delegated to pluggable TaskProvider implementations, making the capability
backend-agnostic.
Installation
pip install functualize-tasks
Quick Start
from functualize_tasks import Tasks, TaskStatus, TaskLink
tasks = Tasks()
# Create tasks
task_id = tasks.add("Run database migration")
tasks.add("Deploy service", linked_to=TaskLink(kind="job", target="deploy"))
# Update status
tasks.update(task_id, status=TaskStatus.IN_PROGRESS)
tasks.update(task_id, status=TaskStatus.DONE, notes="Migration complete")
# List and filter
pending = tasks.list(status=TaskStatus.PENDING)
all_tasks = tasks.list(filter="service")
Features
- CRUD task management — add, list, update, delete, and link tasks with a clean method-call API
- Event-driven mutations — every state change emits structured events (
tasks.task.created,tasks.task.updated,tasks.task.completed,tasks.task.deleted) via a duck-typed EventBus - Pluggable storage — implement the
TaskProviderprotocol to back tasks with any persistence layer (in-memory, SQLite, remote service) - Rich data model —
TaskItemwith status enum (PENDING,IN_PROGRESS,DONE,SKIPPED,BLOCKED), optionalTaskLinkto associate tasks with jobs or workflow steps - Testing double included —
MockTaskscaptures all operations for assertion while executing against a real in-memory provider - Type-safe — fully typed with PEP 561
py.typedmarker for mypy/pyright support
API Reference
Public classes, types, and constants exported by this plugin:
Capability
Tasks— Main capability class providingadd(),list(),update(),delete(), andlink()methods
Protocols
TaskProvider— Runtime-checkable protocol that storage backends must implement
Types
TaskItem— Frozen dataclass representing a task (id, title, status, linked_to, notes, creator, created_at)TaskLink— Frozen dataclass specifying a link kind and targetTaskStatus— String enum with values:PENDING,IN_PROGRESS,DONE,SKIPPED,BLOCKED
Errors
TaskNotFound— Raised when an operation targets a non-existent task ID
Event Constants
TASKS_CREATED—"tasks.task.created"TASKS_UPDATED—"tasks.task.updated"TASKS_COMPLETED—"tasks.task.completed"TASKS_DELETED—"tasks.task.deleted"
Testing
MockTasks— Operation-capturing testing double withoperations,adds,updates,deletes,linkspropertiesMockTaskOperation— Frozen dataclass recording a single captured method call (method, args, kwargs, result)
Metadata
domain_metadata—DomainMetadatainstance describing the tasks domain SDK
Development
Run plugin tests:
uv run pytest plugins/functualize-tasks/tests/ -v
Release files for functualize-tasks 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| functualize_tasks-0.1.0.tar.gz | 9.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| functualize_tasks-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.3 kB
Release files / functualize_tasks-0.1.0.tar.gz
| Download URL | functualize_tasks-0.1.0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3d5235db21ec00f5e6990997be956a79e366cff571f5bf68968cc2d6c26aa6a
|
|
BLAKE2b-256 checksum How to use checksums |
f02e2405d4fb0c74fafca7e46f7f0cf41a6dc2efafe23bd9bb46da0be063760d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / functualize_tasks-0.1.0-py3-none-any.whl
| Download URL | functualize_tasks-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
94354ad8d80d321cd23d3bae46deca2f1326532bb9ea9cabf31c2dca4057dd8d
|
|
BLAKE2b-256 checksum How to use checksums |
d42034ff2c058f1580df375f0aaae719edb32180fafa7674063078dd83660e32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|