Skip to main content

fabricatio-digest

MIT Python Versions PyPI Version PyPI Downloads PyPI Downloads Build Tool: uv

Converts a natural-language requirement into a validated, executable TaskList with role awareness and dependency sequencing.


Installation

pip install fabricatio[digest]

Overview

fabricatio-digest takes a raw requirement string together with a set of registered roles and uses an LLM-backed proposal pipeline to generate a structured TaskList. The resulting task list is executable — each task carries the context and description injected during generation, and hook callbacks can be attached for pre/post-execution behavior.

Key Classes

Digest (mixin capability)

Extends Propose. Inherit this to add requirement-to-tasklist generation to a role.

from fabricatio_digest.capabilities.digest import Digest

class PlannerRole(SomeBaseRole, Digest):
    """A role that can break down requirements into task lists."""
    pass

task_list = await planner.digest(
    requirement="Summarize all PRs from the last week and post to Slack.",
    receptions={RoleName("reviewer"), RoleName("notifier")},
)
Method Description
digest(requirement, receptions, **kwargs) Renders a template with the requirement and role metadata, then calls propose(TaskList, ...). Returns Optional[TaskList].

TaskList

Pydantic model representing a sequence of tasks that aim to satisfy an ultimate_target.

Field / Method Description
ultimate_target: str The overarching goal of the task list.
tasks: List[Task] Ordered list of Task objects from fabricatio-core.
parallel: bool If True, tasks are executed concurrently.
add_before_exec_hook(hook) Register a callback to run before each task.
add_after_exec_hook(hook) Register a callback to run after each task.
inject_context(**kwargs) Merge keyword arguments into every task's initial context.
inject_description(desc: str) Append extra text to every task's description.
execute(parallel=None) Run the task sequence, respecting hooks and the parallel flag.
explain() Render a human-readable explanation via template.

Configuration

All options below are read through the fabricatio configuration chain (see the Configuration Guide). Set them under the [ext.digest] table in fabricatio.toml, equivalently under [tool.fabricatio.ext.digest] in pyproject.toml, or via FABRICATIO_EXT__DIGEST__<FIELD_UPPER> environment variables.

[ext.digest]
digest_template = "built-in/digest"
task_list_explain_template = "built-in/task_list_explain"
Option Type Default Description
digest_template str "built-in/digest" Template name for digest
task_list_explain_template str "built-in/task_list_explain" Template name for task list explain.

Access at runtime: from fabricatio_digest.config import digest_config.

Dependencies

  • fabricatio-core — core interfaces, template manager, and Propose/Task base classes.

License

MIT — see LICENSE

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fabricatio_digest-0.3.3-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file fabricatio_digest-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: fabricatio_digest-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fabricatio_digest-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5fb26fa773333a0f94829a4bfe97c07e9182c0f9df3f2d773ac7126c3a12bf38
MD5 42c7faf04e8e63a22394db9428fda869
BLAKE2b-256 efd1d1065b75be22a4f0f2f57a6a8816d14c3e320b76fb29eecad95413cf6700

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.3 This release

1 file

0.3.2

1 file

0.3.1

1 file

0.3.0

1 file

0.2.0

1 file

0.1.7

1 file

0.1.6

1 file

0.1.5

1 file

0.1.4

1 file

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page