The Shiny Web framework for R has arrived on Python, with an alpha version available now at shiny.rstudio.com/pyPosit (formerly RStudio) CTO Joe Cheng announced at the RStudio conference.
Posit is the new corporate name of RStudio announced to open the conference. Cheng repeatedly emphasized during his presentation that the framework is still in its infancy. In other words: do not plan to use it in the short term for production-critical applications.
RStudio usually likes to soft-launch its products and ask early adopters for feedback before making a public unveiling, but this project has been done in secret until today’s conference.
Shiny for Python joins frameworks like Dash and Streamlit in the Python space. Why another frame? Without going into specifics, Cheng said he believes each framework has different trade-offs and they can coexist 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 released 10 years ago in July 2012. At that time, R was considered by many to be a niche language for statistics. and not suitable for wider uses.
However, Cheng said there’s an interesting quirk of R that makes it ideal for a web framework: Unlike almost every other modern programming language, R allows named arguments to be placed before positional arguments in a function.
“R is the best language for Shiny. I will die on this hill,” Cheng said.
However, he then quoted Dan Callahan’s PyCon 2018 keynote: “Python is the second best language for everything, it’s an incredible aspiration.” Cheng thinks Python will also be a great platform for the framework.
In addition to the ability to deploy Shiny for Python to many of the same platforms as Shiny for R, such as shinyapps.io and RStudio server, a Shiny Python application can also be deployed to a static web server using Wasm (WebAssembly). This is not possible for Shiny R applications today. When asked if it was on Shiny in R’s roadmap, Cheng replied, “We hope so.”
There is a 20-minute talk scheduled for tomorrow (Thursday, July 28) at 11:30 a.m. EDT by Winston Chang that will be broadcast live on Run Shiny Serverless.