ImportantCaution
This section is still under development. Thank you for your patience.
This section will introduce the two main resources the book is built around, how to set up Python development tools on your local machine, and common integrated development environments (IDEs) for Shiny for Python applications.
A standalone app.py file is a fine place to start. But as an app grows, packaging it offers real benefits:
pytest can test code that lives in an importable packagepyproject.toml files make dependencies explicit and installableThis section will introduce the two main resources the book is built around: Shiny for Python and Python packages.
We’re going to be using the application and code referenced directly from Posit’s documentation:
The Python Packages book is an excellent resource for understanding how to package a Python project. It’s also written in the same basic style and structure of R Packages, 2ed, so if you’re coming from the R development world (as I am), these similarities should be comforting.
This book covers building Python applications in the Positron integrated environment. I’ll also provide a few other options for Python/Shiny app development.
Positron
is a “free, AI-assisted environment, empowering the full spectrum of data science in Python and R.”
When I’m using Positron for development, you’ll see this icon:![]()
VS Code
is also a popular IDE for Python developers.