Skip to main content

The visualization layer for Pathway - real-time dashboards for streaming data

Project description

PathwayViz

PyPI License: MIT

Real-time dashboards for streaming data pipelines.

Building dashboards for streaming pipelines is typically a choice between bad options:

  • Jupyter notebooks - Good for exploration, but not suitable for production
  • Grafana - Requires learning PromQL and running additional services
  • Custom React app - Adds frontend development and WebSocket management to your workload

PathwayViz provides a simpler approach: add a few lines to your Python pipeline to get a embedable dashboard.

import pathway as pw
import pathwayviz as pv

# Stream data from Kafka, files, databases, APIs
orders = pw.io.kafka.read(...)
revenue = orders.reduce(revenue=pw.reducers.sum(pw.this.amount))

# Dashboard widgets
pv.stat(revenue, "revenue", title="Revenue", unit="$")
pv.start()
pw.run()

Visit http://localhost:3000 to view your dashboard.

What is Pathway?

Pathway is a Python framework for building streaming data pipelines. Somewhat like pandas for real-time data:

  • Read from anywhere: Kafka, files, databases, APIs
  • Process like pandas: Use familiar operations like groupby(), filter(), reduce()
  • Incremental computation: Only recompute what changed when new data arrives
# This looks familiar, right?
orders = pw.io.kafka.read("orders", format="json")
hourly_sales = orders.groupby(pw.this.category).reduce(
    category=pw.this.category,
    total=pw.reducers.sum(pw.this.amount)
)

Pathway handles the hard stuff: backpressure, state management, exactly-once processing. You write the logic that matters.

Architecture

flowchart TB
    subgraph DataSources["Data Sources"]
        K[Kafka/Redpanda]
        F[Files/CSV]
        D[PostgreSQL/MySQL]
        A[REST APIs]
    end

    subgraph PathwayEngine["Pathway Pipeline"]
        P[Pathway Processing]
        P -->|incremental updates| T[Pathway Tables]
    end

    subgraph VizLayer["PathwayViz"]
        PV[Python API]
        PV -->|JSON updates| RS[Rust WebSocket Server]
        RS --> RB[Ring Buffers]
        RS --> B[Browser Dashboard]
    end

    DataSources --> PathwayEngine
    T --> PV

The Rust server handles the heavy lifting - WebSockets, caching, serving assets. No Python GIL bottlenecks, no async nightmares.

Quick Start

pip install pathway-viz

Basic Example

import pathway as pw
import pathwayviz as pv

# Read from Kafka (or files, databases, etc.)
orders = pw.io.kafka.read(
    {"bootstrap.servers": "localhost:9092"},
    topic="orders",
    format="json"
)

# Calculate metrics
totals = orders.reduce(
    revenue=pw.reducers.sum(pw.this.amount),
    count=pw.reducers.count()
)

# Create dashboard
pv.stat(totals, "revenue", title="Revenue", unit="$")
pv.stat(totals, "count", title="Orders")
pv.start()
pw.run()

Visit http://localhost:3000 - your dashboard is live.

Embed in Your App

Need a widget in your existing app? Use an iframe:

<iframe src="http://localhost:3000/embed/revenue"></iframe>

Or use the React/Svelte components (see embedding docs).

Real Example: E-Commerce Dashboard

Here's what a production setup looks like:

import pathway as pw
import pathwayviz as pv

# Stream orders from Kafka
orders = pw.io.kafka.read(kafka_settings, topic="orders", format="json")

# Real-time aggregations
revenue_by_region = orders.groupby(pw.this.region).reduce(
    region=pw.this.region,
    revenue=pw.reducers.sum(pw.this.total),
    orders=pw.reducers.count()
)

# Time-based metrics (orders per minute)
orders_per_min = orders.windowby(
    pw.this.timestamp,
    window=pw.temporal.tumbling(duration=timedelta(minutes=1))
).reduce(
    window_end=pw.this._pw_window_end,
    count=pw.reducers.count()
)

# Dashboard layout
pv.title("Live E-Commerce Metrics")
pv.stat(orders.reduce(revenue=pw.reducers.sum(pw.this.total)), "revenue", title="Revenue", unit="$")
pv.chart(orders_per_min, "count", x_column="window_end", title="Orders/Min")
pv.table(revenue_by_region, title="Revenue by Region")

pv.start()
pw.run()

Run the demo to see it in action:

python -m pathway_viz

Why Rust?

The hot path needed speed. Python's great for logic, but WebSockets + high throughput = pain points:

  • Tokio async runtime: Handles thousands of concurrent connections
  • Ring buffers: New clients catch up instantly without replaying the entire stream
  • Zero-copy: Serve frontend assets directly from the binary
  • No GIL: Actual parallelism when you need it

The Python API stays simple. The Rust does the heavy lifting.

Install

# Basic install
pip install pathway-viz

# With demo dependencies (Kafka, etc.)
pip install pathway-viz[all]

Documentation

What's Next

  • Core widgets: stat, chart, gauge, table
  • Pathway integration
  • Embed mode for iframes
  • Theme customization
  • Prometheus metrics endpoint
  • Authentication/SSO

License

MIT - build cool stuff with it.

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

pathway_viz-0.2.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distributions

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

pathway_viz-0.2.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (961.9 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

pathway_viz-0.2.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (961.9 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

pathway_viz-0.2.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (962.2 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

pathway_viz-0.2.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (964.7 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

pathway_viz-0.2.0-cp311-abi3-win_amd64.whl (701.1 kB view details)

Uploaded CPython 3.11+Windows x86-64

pathway_viz-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (970.8 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

pathway_viz-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (966.1 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

pathway_viz-0.2.0-cp311-abi3-macosx_11_0_arm64.whl (863.0 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

pathway_viz-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl (875.2 kB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file pathway_viz-0.2.0.tar.gz.

File metadata

  • Download URL: pathway_viz-0.2.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pathway_viz-0.2.0.tar.gz
Algorithm Hash digest
SHA256 92c799363f8d06293d4cc2f199d65bd1627e6c4cfe4fde83521ca2df14eed37b
MD5 51f7d9c6948611fcf2412e1a9d80e2aa
BLAKE2b-256 390c6ec9ea10eab0a2999453ba89c1ef5462ff14fb31cbe76770e4ab04a19d74

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathway_viz-0.2.0.tar.gz:

Publisher: pypi-publish.yml on mvfolino68/pathway-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pathway_viz-0.2.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pathway_viz-0.2.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 fa1f2c047cc11f000736bdf8c526d42943b6f93ebf2828b297f3149d167d2439
MD5 b8257245b0cd4d739a2a6f3b6e40e3ce
BLAKE2b-256 7054395d4546c8fd890df633f2048bdd9c075eb0de5ed90d963a68c6e2918575

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathway_viz-0.2.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: pypi-publish.yml on mvfolino68/pathway-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pathway_viz-0.2.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pathway_viz-0.2.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 49b26560b17575290b6d326eaf21d8d0a2b0a29c01985a35839a0a2a6e86b96d
MD5 8452b924b23eebe5c2e03c9292b7c9b3
BLAKE2b-256 93baad84098e8d3c7c24fb13835994873487995e2c09b57faf796316706f7452

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathway_viz-0.2.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: pypi-publish.yml on mvfolino68/pathway-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pathway_viz-0.2.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pathway_viz-0.2.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a343fa8e49ff6ca929400414cb290783be9c9f51cf15571be3a41be7426c1c7d
MD5 12802b0ce5b17e2aced54d8556264a30
BLAKE2b-256 99ec4f3ef6aa6a3de2871f28ad7ec456016e600cbda94370306c09a18dae4a50

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathway_viz-0.2.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: pypi-publish.yml on mvfolino68/pathway-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pathway_viz-0.2.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pathway_viz-0.2.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 86d9c2f67a7088c17758441044c4189c545d7a9a6b13eb5a6c7f2d97cd9940b5
MD5 b58bcfa421481a877c6edf64820ba646
BLAKE2b-256 d296ccd45c298c9935f3f0fb2da752d2cbd05f30a963cb76756d661237a54119

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathway_viz-0.2.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: pypi-publish.yml on mvfolino68/pathway-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pathway_viz-0.2.0-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: pathway_viz-0.2.0-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 701.1 kB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pathway_viz-0.2.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 fe4a45fb13898b28c80f13c97187f73c5a4bbfb0a4d3426ddfd18eb0f8aa4358
MD5 2283472f913fee37b008453356719f87
BLAKE2b-256 4420c19657faa9b4e0915cea6b5e12a2aa9ac0c0fd3ba5de8e8dc19d4954f892

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathway_viz-0.2.0-cp311-abi3-win_amd64.whl:

Publisher: pypi-publish.yml on mvfolino68/pathway-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pathway_viz-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pathway_viz-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2892e874d9bc1ddcf0d7a7d03e6307836f9f777c3a3b9d86bb843109dc8af032
MD5 03ab02fb6fc269f459b293bf4952661d
BLAKE2b-256 30868f80e78d384ee4d781e4fbe249dd09b0e25d7269d09f9a1c70cc3e6c1f7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathway_viz-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi-publish.yml on mvfolino68/pathway-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pathway_viz-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pathway_viz-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b5a33f2f40106611bb534ecaeecabc054d3c00498ece204bae3a1831cfd83ce5
MD5 9dd6228696b4f1f77b422aac6e13367c
BLAKE2b-256 488711eb06751a2bbadf43126c6e124df6b8d56bf18ee69fd20d1b559dde2e56

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathway_viz-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: pypi-publish.yml on mvfolino68/pathway-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pathway_viz-0.2.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pathway_viz-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e388ee1d645321dbbc405f60ea6f19fdfcd948ac67fb84ecba9af6f95449b902
MD5 827efa37e28e6019ee7fd49804e369d9
BLAKE2b-256 1e6d6c1be3162b2de353b303c04cdd1da0d8ae16ee138b9998a4e6bfaa4d7f59

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathway_viz-0.2.0-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: pypi-publish.yml on mvfolino68/pathway-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pathway_viz-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pathway_viz-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 35c7f6e2c7b95f6895a7904b3ca97b72088fc9e53cb142b15b6a027d74d78a78
MD5 dd3d4f6723808473e106c2703a790831
BLAKE2b-256 14fc22ca004c6d9cbe2bb7ea2d9b5d3d94af9669d33ccc10bf79b60606fa9368

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathway_viz-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl:

Publisher: pypi-publish.yml on mvfolino68/pathway-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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