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.3.1.tar.gz (5.0 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.3.1-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for plotsrv-0.3.1.tar.gz
Algorithm Hash digest
SHA256 13b5174c05850c974aa85dc3d43403fbaf96d05d537fb976badface1f362bece
MD5 2e954116f3173d82f327102d1b5780bb
BLAKE2b-256 85dfa18f9c7433fdc97dc66116ef85b6f202e01140918aedd5131b08a943eaea

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for plotsrv-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 73050102d3043a66160abf917a7b743f06aac0eb3f2d26a4c5415590cf55dede
MD5 8ed7eb487a17948ae0acc8190bdfd792
BLAKE2b-256 aa2002044be684bb7568be36edfcf9dd04c283ddb28b5ea417acfccd30daf0c0

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