Skip to main content

Cheap observability for Python processes

Project description

plotsrv icon      plotsrv

Developer friendly, lightweight observability for Python processes.

CI Codecov PyPI Python versions

Documentation · Quick start · Python API · CLI · Examples

Turn Python objects into live browser views with minimal code.

It is designed for scripts, pipelines, experiments, batch jobs, and long-running processes where useful outputs are otherwise hidden in terminal logs, temporary objects, generated files, or ad hoc plots.

plotsrv can render tables, plots, JSON, HTML, logs, images, tracebacks, files, and ordinary Python objects in a single browser UI.

Live demo: https://demo.plotsrv.com
See a deployed example showing real sensor data.

Install

pip install plotsrv

or:

uv add plotsrv

Quick example

import plotsrv as ps

summary = {
    "status": "ok",
    "rows_processed": 123,
    "checks": {
        "schema_valid": True,
        "duplicates": 2,
    },
}

ps.publish_view(
    summary,
    label="summary",
    section="demo",
    launch_server=True,
)

Open:

http://127.0.0.1:8000

Server workflow

For scripts, jobs, and pipelines, start plotsrv separately:

plotsrv run demo_pipeline.py --host 127.0.0.1 --port 8000

Then publish to it from Python:

import plotsrv as ps

@ps.view(label="daily import", section="pipelines", host="127.0.0.1", port=8000)
def daily_import_status():
    return {
        "job": "daily-import",
        "status": "ok",
        "rows_processed": 123,
    }

daily_import_status()

The function still returns normally, while plotsrv publishes the returned object into the browser UI.

What can plotsrv show?

plotsrv automatically chooses renderers for common outputs, including:

  • pandas and Polars DataFrames
  • matplotlib and plotnine plots
  • dictionaries, lists, and JSON-like objects
  • text, logs, markdown, HTML, and images
  • Python objects and tracebacks
  • files on disk, including CSV, JSON, YAML, TOML, markdown, HTML, text, and images

Why use it?

plotsrv provides cheap observability for Python processes.

It is useful when you want more visibility into a script or pipeline without building a dashboard, adopting a full observability stack, or manually opening generated files on disk.

Learn more

License

plotsrv is licensed under the Apache License 2.0.

See the LICENSE file for full details.

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

plotsrv-0.4.0.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

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

plotsrv-0.4.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file plotsrv-0.4.0.tar.gz.

File metadata

  • Download URL: plotsrv-0.4.0.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for plotsrv-0.4.0.tar.gz
Algorithm Hash digest
SHA256 64498c1c411847ff4a710de2ac2cec0a88c8172c1fbe77c55baa44b0d4860b5b
MD5 6dc0a7f6cb71515e83c1ad6ffd75928f
BLAKE2b-256 76986027b99e5f03a8b5449f6f1e2b364af2f21720ca3cd0f8f931c355240e51

See more details on using hashes here.

File details

Details for the file plotsrv-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: plotsrv-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for plotsrv-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 310c2df35f9fdc74f8ecf713921c3500679a40c4991bd95983a6fbfa3ce43813
MD5 c240de93324af1b558b377453bc64e86
BLAKE2b-256 0c41bbb7ab9a30c4e300b97bb317c36fff96ed13e94075020f5a38bc21fff30e

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