Introduction

Published

2026-05-12

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.

Why put an app in a package?

A standalone app.py file is a fine place to start. But as an app grows, packaging it offers real benefits:

  • Reusability — share utility functions, modules, and data across projects
  • Testabilitypytest can test code that lives in an importable package
  • Reproducibilitypyproject.toml files make dependencies explicit and installable
  • Deployability — properly packaged apps are easier to containerize and deploy

Resources

This section will introduce the two main resources the book is built around: Shiny for Python and Python packages.

Shiny for Python (core)

We’re going to be using the application and code referenced directly from Posit’s documentation:

Python Packages

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.

System setup

Terminals

Python installations

Python packaging software

Integrated Development Environments (IDEs)

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

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

VS Code is also a popular IDE for Python developers.