Skip to content

Streamlit#

Streamlit is an open-source Python library that makes it easy to build beautiful custom web-apps for machine learning and data science.

Deploying#

Streamlit apps can be deployed with the rsconnect-python package. See the Publishing with rsconnect-python section for details.

Example apps#

There are some Streamlit example apps available from the Streamlit developers:

To deploy one of these examples, first clone the repository:

git clone https://github.com/streamlit/<app-name>

Install any required dependencies. Test the app locally:

streamlit run <app-name>/streamlit_app.py

Then deploy to RStudio Connect:

rsconnect deploy streamlit -n <saved server name> --entrypoint streamlit_app.py <app-name>/

Limitations#

User meta-data#

Due to a limitation in Streamlit, Streamlit apps cannot currently access HTTP request headers. This includes the RStudio-Connect-Credentials header, which provides the accessing username and group membership information.

Python 2 Compatibility#

  • RStudio Connect requires Streamlit v56.1 or higher.
  • As of version 0.56, Streamlit no longer supports Python 2.x. Streamlit apps must use Python 3.5 or higher.

Bokeh Compatibility#

  • Streamlit versions starting with 0.57 require Bokeh 2.0 or higher.
  • Streamlit versions prior to 0.57 require Bokeh 1.4.
  • Bokeh charts embedded within Streamlit can use Javascript callback functions, but Bokeh's Python callbacks are not supported by Streamlit.

Internet Explorer Compatibility#

Important

Internet Explorer 11 is no longer supported by RStudio server products. Please see our Platform Support page for a list of supported browsers.

As of version 0.60, Streamlit is not compatible with Internet Explorer due to a known issue in Streamlit.