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.0.tar.gz (10.3 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.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ghostpipe-0.1.0.tar.gz
  • Upload date:
  • Size: 10.3 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.0.tar.gz
Algorithm Hash digest
SHA256 556919fb9b0cbf6781b97d4f38f53e5575fa2e64b8a0e476f222811ec7ac1e8c
MD5 a0ace2beac02d5b381bd4b01b05a8e60
BLAKE2b-256 6d8a45030ded5e92013b9f2fee9b1fcdaae83bb7044e07a3919ca3bc5b2c6f54

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ghostpipe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61874b45a47645f190b56d5f8042b723cfb7b6c119382fdf4dc6801fd09d4afa
MD5 26447e35ae3673d11f8a70190a6474f8
BLAKE2b-256 f5f69be2dda6285ccd348dadfa0e0421549ff9f812dddecd1921d132bebb4e75

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