RStudio unveils Shiny for Python

After 10 years as an R framework, the Shiny web framework is now available for Python in an alpha release.

The Shiny Web framework for R has come to Python, with an alpha version available now at shiny.rstudio.com/py, RStudio CTO Joe Cheng announced at the RStudio Conference this afternoon.

Cheng stressed repeatedly during his presentation that the framework is still in very early stages. In other words, don’t plan on using Shiny for Python in the short term for mission-critical apps in production. RStudio typically likes to soft launch its products and have early adopters give feedback before doing a public unveiling, but this project was conducted in secret until today’s conference.

screen shot of the new Shiny for Python website Posit

Part of the Shiny for Python website.

Shiny for Python joins frameworks such as Dash and Streamlit in the Python space. Why another framework? While not going into detail, Cheng said he believes each framework makes different trade-offs and they can co-exist depending on user needs. “We think there’s room for something new in the Python world,” he said.

Before revealing the new framework, Cheng talked about the history of Shiny for R, which was made public 10 years ago in July 2012. At that time, R was considered by many to be a niche language for statistics and not appropriate for broader uses. However, Cheng said there’s one interesting quirk of R that makes it ideal for a web framework: Unlike almost any other modern programming language, R allows named arguments to be placed before positional ones within a function.

Screen shot of Joe Cheng speaking at RStudio Conference along with a slide about Sharon Machlis

Joe Cheng speaks at RStudio Conference (viewed from the live stream).

“R is the best language for Shiny. I will die on this hill,” Cheng said.

However, he later quoted Dan Callahan’s PyCon 2018 keynote: “Python is the second-best language for anything, that is an amazing aspiration.” Cheng believes Python will be an excellent platform for the framework as well. 

A Shiny Python app not only can deploy on many of the same platforms as Shiny for R, such as shinyapps.io and RStudio Server, but also to a static Web server thanks to WebAssembly. That’s not possible for Shiny R apps today. When asked if that’s on the road map for Shiny in R, Cheng responded: “We sure hope so.”

There is a scheduled 20-minute talk tomorrow (Thursday, July 28) at 11:30 am EDT on “Running Shiny without a Server” by Winston Chang that will be live streamed.

In other news, RStudio announced it will be changing its name to Posit in order to reflect the company’s expanding focus on Python and Visual Studio Code.

Copyright © 2022 IDG Communications, Inc.

How to choose a low-code development platform