Skip to main content

Loom

Loom provides domain-neutral building blocks for executing tasks in flows and exploring alternative flow implementations or configurations with a Workbench. Contracts evaluate results independently of any particular domain or agent.

Flow

A Flow controls task sequencing, branching and repetition. Its execute() returns a FlowResult; tasks return TaskResult. Flow.repeat() runs a task until it reports no modification or reaches its iteration limit.

Workbench

A Workbench constructs flows and runs a FlowVariant, which specifies task flow constructor configuration. Each Flow owns the selection and execution of its tasks.

from loom.core import Evaluation, FlowVariant, Workbench

workbench = Workbench(MyFlow)
result = workbench.run(input_value, FlowVariant(configuration={"level": 2}))

# strategy.propose(previous_evaluation) returns a FlowVariant.
# evaluator returns Evaluation(accepted=..., result=result, feedback=...).
result = workbench.explore(input_value, strategy, evaluator=evaluator,
                           max_attempts=5)

Without an evaluator, a run is accepted when it returns successfully. Execution exceptions are passed to the strategy as failed Evaluation feedback. After exhausting attempts, AttemptsExhausted.evaluation retains the last outcome. An input_factory can supply fresh input for each run when flows mutate inputs.

Contracts

Contract, ContractResult, ContractException, and Verifier are available from loom.core. Contracts evaluate results; the verifier collects failures and raises ContractException when a check fails.

Example

See examples for a mock flow and a Workbench running multiple configurations.

Metadata

Release files for loom-workflow 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for loom-workflow 0.9.0
File Size Uploaded Provenance Actions
loom_workflow-0.9.0.tar.gz 7.4 kB Without provenance Details for loom_workflow-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for loom-workflow 0.9.0
File Interpreter ABI Platform Actions
loom_workflow-0.9.0-py3-none-any.whl Python 3 none any Details for loom_workflow-0.9.0-py3-none-any.whl

Total release size: 14.9 kB

Release files / loom_workflow-0.9.0.tar.gz

Download URL loom_workflow-0.9.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d307345437f2ed2f16248d33157b02f6841528855adbe856e4546125802f9d35
BLAKE2b-256 checksum
How to use checksums
783deaee71b6c00c95b56de912cfc89f41035b1785dd414af9d05e15baafbf5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / loom_workflow-0.9.0-py3-none-any.whl

Download URL loom_workflow-0.9.0-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
894475754e624c9dfd8d11fb49264d58cb089270de1562c5b6687004776faafb
BLAKE2b-256 checksum
How to use checksums
3ff9cd08b16f7da8d6b6e8a0ad261910ababda1bc5f7d07001169ee4abcfface
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for loom-workflow 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page