Skip to main content

Generic workflow app runtime and Streamlit renderer with provider plugins

Project description

renderflow

Workflow runtime and rendering API for:

  • Streamlit UI
  • CLI execution
  • HTML report export
  • Individual figure export

Core Idea

renderflow owns the interface contract and rendering behavior. Provider packages should mostly define workflows (run_workflow + params), not custom UI/CLI plumbing.

Demo App

Live Streamlit demo:

https://demo-for-renderflow.streamlit.app/

CLI

List installed providers:

renderflow list-providers

List provider workflows:

renderflow list-workflows --provider crsd-inspector

Show interpreted workflow parameters:

renderflow show-params --provider crsd-inspector --workflow signal_analysis

Provider-scoped CLI (no provider cli.py needed):

[project.scripts]
crsd-inspector = "renderflow.cli:main"

With that entrypoint, crsd-inspector -h shows workflows plus parameter defaults/help pulled from provider workflow specs.

Execute a workflow in terminal mode:

renderflow execute \
  --provider crsd-inspector \
  --workflow signal_analysis \
  --param crsd_directory=examples \
  --param prf_hz=1000 \
  --output terminal

Execute and export both:

  • one combined report file (--html)
  • per-figure files (--save-figures-dir + --figure-format)
renderflow execute \
  --provider crsd-inspector \
  --workflow signal_analysis \
  --param crsd_directory=examples \
  --html output/report.html \
  --save-figures-dir output/figures \
  --figure-format html

Add per-figure JSON in the same run:

renderflow execute \
  --provider crsd-inspector \
  --workflow signal_analysis \
  --param crsd_directory=examples \
  --html output/report.html \
  --save-figures-dir output/figures \
  --figure-format html \
  --figure-format json

Export multiple figure formats in a single run:

renderflow execute \
  --provider crsd-inspector \
  --workflow signal_analysis \
  --param crsd_directory=examples \
  --save-figures-dir output/figures \
  --figure-format html \
  --figure-format json

Comma-separated format lists are also accepted:

renderflow execute \
  --provider crsd-inspector \
  --workflow signal_analysis \
  --param crsd_directory=examples \
  --html output/report.html \
  --save-figures-dir output/figures \
  --figure-format html,json

If --figure-format is omitted, per-figure export defaults to html. Image formats (png, jpg, jpeg, svg, pdf) require Kaleido. renderflow includes kaleido as a dependency.

Launch Streamlit:

renderflow run --provider crsd-inspector

Workflow Result Contract

Use renderflow.workflow.Workflow inside provider workflows:

from renderflow.workflow import Workflow

workflow = Workflow(name="My Workflow", description="...")
workflow.params = {
    "threshold": {
        "type": "number",
        "default": 0.5,
        "label": "Threshold",
        "description": "Minimum score to keep",
    },
}

workflow.add_text("Summary text")
workflow.add_table("Metrics", {"name": ["a"], "value": [1]})
workflow.add_plot(fig, title="Spectrum", figure_id="spectrum", save=True)
workflow.add_code("print('debug')", language="python")
return workflow.build()

add_plot(..., save=False) marks a plot as not exportable when using figure-save operations.

Minimum return contract from run_workflow(...):

  • must return a dict
  • either:
    • modern shape: {"results": [ ... ]}
    • legacy shape: {"text": [...], "tables": [...], "plots": [...]}
  • for modern shape, each item in results must be a dict with:
    • type in text | table | plot | code
    • if type == "plot", item must include figure

Provider Contract Options

1) Explicit AppSpec (fully explicit)

Entry point:

[project.entry-points."renderflow.providers"]
my-provider = "my_provider.app_definition:get_app_spec"

get_app_spec() returns renderflow.contracts.AppSpec.

2) Auto-Defined Provider (minimal)

If no app_definition exists, renderflow auto-builds from:

  • <provider>.workflows.* modules with run_workflow(...)
  • optional <provider>.renderflow module:
    • APP_NAME = "..."
    • WORKFLOWS_PACKAGE = "provider.custom_workflows" (optional)
    • optional custom metadata constants for provider setup

Workflow parameters are pulled from:

  1. workflow.params if a workflow object exists in the module
  2. PARAMS module global
  3. inferred function signature defaults

This lets packages like crsd-inspector keep only workflow definitions and optional init logic, while renderflow handles CLI + Streamlit parameter interpretation and rendering.

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

renderflow-2026.2.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

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

renderflow-2026.2-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file renderflow-2026.2.tar.gz.

File metadata

  • Download URL: renderflow-2026.2.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for renderflow-2026.2.tar.gz
Algorithm Hash digest
SHA256 059cb99e1907773eef6ee7794a35e8091131b7282b346b531a2c5e08ef4564d8
MD5 de04928d4edb2a963dda11734039ee5d
BLAKE2b-256 cc808c6ad86a4bcb4ced3fd6f51f032106588b6aec2779224d22101712a708a1

See more details on using hashes here.

File details

Details for the file renderflow-2026.2-py3-none-any.whl.

File metadata

  • Download URL: renderflow-2026.2-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for renderflow-2026.2-py3-none-any.whl
Algorithm Hash digest
SHA256 02488b3fcce407745022c35194dedf055a13ffe5ed69d03cc8cd09b22532dcca
MD5 105757594f6db26637ec97ed8a0afd9f
BLAKE2b-256 b76a5dd4b87ccb2b9f6305f856bece117157bf78dacc7a74148ded403cf76a68

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