shinychat
Chat UI component for Shiny for Python.
Note: shinychat is automatically installed with Shiny for Python and available as shiny.ui.Chat and shiny.express.ui.Chat. For complete instructions about creating chatbots please see the Shiny for Python documentation.
Installation
You can install shinychat from PyPI with:
uv pip install shinychat
Or, install the development version of shinychat from GitHub with:
uv pip install git+https://github.com/posit-dev/shinychat.git
Example
from shiny.express import render, ui
from shinychat.express import Chat
# Set some Shiny page options
ui.page_opts(title="Hello Chat")
# Create a chat component, with an initial greeting
chat = Chat(
id="chat",
greeting="Hello! How can I help you today?",
)
# Display the chat
chat.ui()
# Define a callback to run when the user submits a message
@chat.on_user_submit
async def handle_user_input(user_input: str):
await chat.append_message(f"You said: {user_input}")
"Message state:"
@render.code
def message_state():
return str(chat.messages())
Metadata
Release files for shinychat 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| shinychat-0.7.1.tar.gz | 535.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shinychat-0.7.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / shinychat-0.7.1.tar.gz
| Download URL | shinychat-0.7.1.tar.gz |
|---|---|
| Size | 535.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c49b7df2890e1abd80613f411a81122fff15ea8c161a995eee387188bf4e4fea
|
|
BLAKE2b-256 checksum How to use checksums |
791e48009eaa9706007a543c3af957bc167444eaf32165108ab2471b1d984313
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency logRelease files / shinychat-0.7.1-py3-none-any.whl
| Download URL | shinychat-0.7.1-py3-none-any.whl |
|---|---|
| Size | 554.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e436e58c344faf1bfddd4c883cfce4a3a868805cb4d8f1b8cddc7a2b6497a07a
|
|
BLAKE2b-256 checksum How to use checksums |
ec21805b5771056defc488f147bce78d09fd55050ebe65dc971abd837e8ca339
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency log