Shiny for Python

Shiny for Python is a web application framework for Python.

Get started by following the Shiny for Python Getting Started Guide then visit the examples page.

You can deploy Shiny for Python applications to Posit Connect using rsconnect-python 1.10.0 or later and the command:

rsconnect deploy shiny -n my-server my-shiny-app/

Tracking Visits

Connect records visits to Shiny applications and lets you see:

  • Which applications were viewed
  • When the applications were viewed
  • Who viewed the application
  • The length of each session

An overview of recent activity is available in the Posit Connect dashboard. See the Content Settings Panel section to learn more.

Details about each visit are available through Connect Server API instrumentation endpoints. Perform your own analysis using the results from these endpoints. Code examples showing how to obtain this data can be found in the User Activity section of the Posit Connect: Server API Cookbook.

Specifying Protocols

Posit Connect provides a wide variety of techniques to keep the data in the web browser synchronized. The preferred technique, and the one most widely used, is the use of WebSockets. If WebSockets are not supported, either by some intermediate network between the server and your client or by your client’s web browser, then a fallback protocol will be used.

To change the available protocols from the client, open a Shiny application and press the keyboard shortcut: Ctrl+Alt+Shift+A (or, from a Mac: control+option+shift+A). This will open a window that will allow you to select or clear any of the available protocols. After you confirm the changes, these settings will be saved in your browser for future visits to this server.

If you are actively visiting an application, refresh the browser page or tab in order for the new settings to take effect within your session. These settings will last until you explicitly change them again; they will only have an effect on the browser in which this action was performed.