skillfed

shinychat

An AI Chat interface for Shiny apps.

shinychat v0.6.1 320.6K downloads/30d#7,635 on PyPI136
Permissive license MIT Active released

What it is and what it does

shinychat is a chat UI component library for Shiny for Python that abstracts the interface layer for building conversational applications. It provides a Chat class that manages message display, user input collection, and event handling, letting developers focus on the backend logic rather than HTML/CSS markup. The component integrates directly into Shiny's reactive framework and supports both imperative and declarative usage patterns.

Typically used to add a chat interface to a Shiny app by instantiating a Chat object, rendering it with `.ui()`, and attaching an async callback to handle user submissions. Messages are managed as a reactive list, and the component handles rendering, scrolling, and input field management. It is automatically included with Shiny for Python but can be installed separately if needed.

Use it for:

  • Build a chatbot UI in a Shiny app that delegates message generation to an external LLM API.
  • Create an interactive Q&A interface where user queries trigger backend computations and responses are appended to the chat.
  • Prototype conversational data exploration tools that accept natural-language queries and display results.
  • Add a support or help chat widget to an existing Shiny dashboard without writing custom HTML/JavaScript.
  • Develop multi-turn dialogue systems where message history is maintained and used for context in subsequent calls.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

shinychat provides a chat UI component for building conversational interfaces in Shiny for Python applications, handling message display, user input, and callback handling.

Yes, if you are building a Shiny for Python application that needs a chat interface. The component is actively maintained, has no known vulnerabilities, low install friction, and integrates seamlessly with Shiny's reactive model. It is permissively licensed and already included with Shiny, so installing it separately is optional unless you need a specific version or want to use it outside a Shiny context.

Install

shinychat on PyPI

pip

pip install shinychat

uv

uv add shinychat

poetry

poetry add shinychat

Installing shinychat

Before you install

Low friction installation with a pure-Python wheel. Actively maintained with a recent release and no known vulnerabilities. Depends on htmltools, pydantic, and shiny—all stable, widely-used libraries.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install shinychat

from shiny.express import render, ui
from shinychat.express import Chat

chat = Chat(id="chat", messages=[{"content": "Hello!", "role": "assistant"}])
chat.ui()

@chat.on_user_submit
async def handle_input(user_input: str):
    await chat.append_message(f"You said: {user_input}")

Requires Python 3.10 or later and a working Shiny for Python environment.

Verify before relying

  • Whether the package includes built-in LLM integration or only provides UI scaffolding for user-supplied models.
  • Performance characteristics and message history size limits for typical chat applications.
  • Styling and customization options beyond what the example demonstrates.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 3 — htmltools, pydantic, shiny
Maintenance actively maintained — 0 days since the last release
Last repo commit
First released
Downloads 320,603/month — #7,635 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: shinychat-0.6.1-py3-none-any.whl

Tags

chat ui component shinyconversational interface pythonchatbot ui shiny pythonchat interface web appshiny chat componentai chat ui frameworkmessage display component
shiny-componentui-frameworkconversational-ai

More Dynamic Content packages