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.
pip install shinyVerified import paths — ran on the pinned version, not inferred.
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.
Update test code to use `.expect_inverse(False)` and `.expect_fluid(True)` where applicable, or adapt to the new `bool` argument for `expect_inverse`.
Use the new `ui.Chat().update_user_input()` method instead, which provides similar functionality and more flexibility.
To view full error messages for debugging purposes, set `sanitize_errors=False` in the `App` constructor: `app = App(app_ui, server, sanitize_errors=False)`.
Set the `SHINY_OTEL_COLLECT` environment variable to `'none'` if you wish to disable all Shiny-specific telemetry collection for sensitive operations or to reduce overhead.
Double-check input IDs for typos. If an error occurs within a `@render` function, the full Python stack trace will be available in the console where `shiny run` was executed. Debug the `@render` function's logic.
Run the application locally (`shiny run app.py --reload`) to see the full stack trace, or disable error sanitization in the `App` constructor: `app = App(app_ui, server, sanitize_errors=False)`.
Verify that the `id` argument in `ui.output_*` matches the name of the decorated function in `server`. Ensure that `input.some_id()` refers to an existing `ui.input_some_id` component. Check the console for any Python exceptions or tracebacks.
Always append `()` when reading the value of an `input` or `reactive.value` within `@reactive.effect`, `@render.*`, or `@reactive.calc` functions, e.g., `input.slider_val()` instead of `input.slider_val`.