Skip to main content

pylier

See the data moving through your Python pipeline.

Decorate the functions you already have. pylier infers the data handoffs and renders the pipeline that actually ran—no graph DSL or manual edge wiring.

Python 3.14+ pylier GitHub stars No manual graph wiring

pylier Application Flow view showing nested fulfillment branches pylier Data Flow view showing value provenance across fulfillment branches

Application Flow

  • Direct argument, return, and exception handoffs between callers and callees.
  • Use it to understand how the application executes.

Data Flow

  • Producer-to-consumer value provenance.
  • Links each returned value directly to every decorated consumer.
  • Use it to understand where data goes and what moves through the pipeline.

Why pylier?

Decorate, don't rebuild

Mark ordinary sync or async functions with @pylier.node. Your application code remains the pipeline.

Follow real data

Edges are inferred from the values passed between stages, so the graph reflects execution instead of a hand-maintained diagram.

Inspect it anywhere

Write a self-contained HTML graph for sharing, or open a live in-process viewer while the pipeline runs.

Try demos

Quick start: document ingestion

The ingestion example is the fastest way to see pylier's value: a document branches into text and image paths, then concurrently embeds both branches before they converge at an indexing stage.

git clone https://github.com/theMladyPan/pylier.git
cd pylier
uv sync
uv run python -m examples.ingest html

Open pylier-ingest.html in a browser. It is a self-contained file—no server required. To watch the graph grow as work happens instead:

uv run python -m examples.ingest serve
# viewer: http://localhost:8765

The whole API in one flow

import pylier


@pylier.node
def load_document(path: str) -> dict: ...


@pylier.node(_tags=["document", "text"])
def extract_text(document: dict) -> list[str]: ...


@pylier.node
def embed(chunks: list[str]) -> list[dict]: ...


with pylier.trace("document-ingest"):
    document = load_document("report.pdf")
    vectors = embed(extract_text(document))

pylier.render("document-ingest.html")  # interactive, standalone HTML

Notes

For a plain-Python transformation or join that loses value provenance, preserve its sources explicitly:

vectors = pylier.derive(text_vectors + image_vectors, from_=[text_vectors, image_vectors])

derive() returns the original value unchanged; its only job is to keep the branch lineage visible in the next decorated stage. See docs/records/derive-lineage.md for its exact behavior.

Built for useful traces

  • Signal over noise — use core, info, debug, and trace capture levels to control both captured nodes and metadata detail.
  • Useful inspection — filter by node tags; click graph nodes and edges for payload type, size, preview, and optional captured values. Full values require PYLIER_CAPTURE_VALUES=1 and remain bounded FIFO by count and bytes. To make an intentionally shareable debug bundle, use pylier.render("debug.html", embed_payloads=True); the bundled data is readable by anyone with the HTML file, so the default static render remains metadata-only. The published examples use this opt-in only because their data is synthetic.
  • Share or streampylier.render() creates a portable HTML file; pylier.serve() streams updates to a local viewer with SSE.
  • Keep an audit trailpylier.trace(..., sidecar="trace.jsonl") writes already-resolved events to JSONL for offline consumers.

Coexistence with other tracers

pylier has no OpenTelemetry, Logfire, FastAPI, or cloud dependency. It records its own local decorator traces and does not mutate ambient tracing context, so another tracer can instrument the same process independently.

Development

uv run pytest
uv run ruff format src tests examples
uv run ruff check src tests examples

Contributing

Issues and pull requests are welcome at theMladyPan/pylier.

Release files for pylier 1.1.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 pylier 1.1.0
File Size Uploaded
pylier-1.1.0.tar.gz 1.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylier 1.1.0
File Interpreter ABI Platform
pylier-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / pylier-1.1.0.tar.gz

Download URL pylier-1.1.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
6b8f13518450a6de2fab8897461fd689be06a179ccd98665e86d94adcb95a247
BLAKE2b-256 checksum
How to use checksums
f928ffdddd2d1c97d7f082ae16d41f9c7c9cc36d52b8709ad6188db57de61a9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}

Release files / pylier-1.1.0-py3-none-any.whl

Download URL pylier-1.1.0-py3-none-any.whl
Size 49.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
682d966710435b22156268913307d46d98334f42e0c086e295462b8bdb16ec04
BLAKE2b-256 checksum
How to use checksums
14f774d29b2b17bb9fe7cbd82cff0a32dc1e9ad2df9b40e6427289b82fb59721
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}

Release history Release notifications | RSS feed

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.2

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.1.0

2 release files

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