Shiny

1.6.0 · active · verified Thu Apr 16

Shiny is an open-source web development framework for Python, enabling data scientists and developers to build interactive web applications and dashboards with purely Python code. Maintained by Posit, it is under active development with frequent releases that introduce features like OpenTelemetry integration, toast notifications, AI-powered test generation, and application bookmarking. It allows for the creation of rich user interfaces that react dynamically to user input.

Common errors

Warnings

Install

Imports

Quickstart

This minimal Shiny application demonstrates a basic slider input (`ui.input_slider`) and a reactive text output (`ui.output_text_verbatim`). The `server` function uses the `@render.text` decorator to reactively display the current value of the slider.

from shiny import App, ui, render

app_ui = ui.page_fluid(
    ui.input_slider("n", "N", 0, 100, 20),
    ui.output_text_verbatim("txt"),
)

def server(input, output, session):
    @render.text
    def txt():
        return f"The value of N is {input.n()}"

app = App(app_ui, server)

view raw JSON →