Skip to main content

Linear pipeline runner with parallel groups, status tracking, and audit trail

Project description

ghostpipe

Linear pipeline runner with parallel groups. Steps are functions. Order is explicit. Zero dependencies.

Install

pip install ghostpipe

Usage

from ghostpipe import Pipeline, Step, Parallel

pipe = Pipeline("assessment", steps=[
    Step("parse", parse_uploads),
    Step("normalize", normalize_data),
    Parallel([
        Step("clarity", score_clarity),
        Step("context", score_context),
        Step("iteration", score_iteration),
    ]),
    Step("aggregate", aggregate_scores),
])

result = pipe.run(raw_input)
# result.status = "complete"
# result.completed = ["parse", "normalize", "clarity", "context", "iteration", "aggregate"]
# result.get("clarity") → 0.82
# result.get("aggregate") → {"overall": 0.78}

How it works

  • Step wraps a bare function. Output of one step is input to the next.
  • Parallel runs multiple steps on the same input concurrently. Outputs merge into a dict for the next step.
  • Errors halt the pipeline by default (halt_on_error=False to continue).
  • Callbacks for step start/complete/error.
  • Audit via ghostseal — every step boundary emits an event with output hash.

Parallel groups

Steps in a Parallel group receive the same input and run in threads. Results are merged into a dict:

pipe = Pipeline("score", steps=[
    Step("prep", prep_fn),
    Parallel([
        Step("x2", lambda x: x * 2),
        Step("x3", lambda x: x * 3),
    ]),
    Step("sum", lambda d: d["x2"] + d["x3"]),
])

result = pipe.run(10)
# result.get("sum") = 50

Order within the group doesn't matter. Same result every time.

With ghostseal audit

from ghostseal import SealClient

audit = SealClient(blackbox_url="https://blackbox:8443", api_key="...")
pipe = Pipeline("assessment", steps=[...], audit=audit)
pipe.run(data)
# Every step start/complete/fail emits to Blackbox

Part of the GhostLogic SDK

maelspine   → config registry
ghostseal   → audit backbone
ghostprompt → prompt management
ghostpipe   → pipeline runner (this package)
ghostrouter → LLM routing
ghostserver → MCP tools

License

Apache 2.0

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

ghostpipe-0.1.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

ghostpipe-0.1.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file ghostpipe-0.1.1.tar.gz.

File metadata

  • Download URL: ghostpipe-0.1.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for ghostpipe-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6450744624a86526cc20b95326dabb81470b1dca26088d594d02ef2cb91167a5
MD5 bf11f381d94f0686f3c6c410b4d14174
BLAKE2b-256 122b145b548e2ad21990443f4555f72958c27f68d6c7476659f52c39f453d0c0

See more details on using hashes here.

File details

Details for the file ghostpipe-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ghostpipe-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for ghostpipe-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56961e19cc8f6b5450bd7f97639fd511f90e6d360851492af392fa453a528a19
MD5 711f599c745887382e30e3e585b01403
BLAKE2b-256 98c58d89d6b54258201fc196250a17507c300a7317427c12fe8dc02b00e08239

See more details on using hashes here.

Supported by

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