Skip to main content

A small tool to help you distribute a Shiny app

Project description

shinypkg

A simple CLI tool to scaffold and package single-file Shiny for Python apps.

This tool is designed for educational and pedagogical use. It provides an easy, reproducible way to build minimal Shiny apps that can be installed and run as Python packages.

📦 Installation

We recommend using uv for clean, reproducible development:

#uv tool install shinypkg
uv tool install git+https://github.com/kenjisato/shinypkg

Alternatively:

#pipx install shinypkg

🚀 Create an App Project

# Step 1: Create a new Shiny app project
shinypkg create myapp

# Step 2: Move into the project directory
cd myapp

# Step 3: Add Shiny to the project dependencies
uv add shiny

# Step 4: Run the app (no installation needed)
uv run myapp

# Optional: Install the app as a tool
uv tool install -e .
myapp

🧰 What does it generate?

After shinypkg create myapp, you will get:

myapp/
├── myapp/
│   ├── __init__.py
│   ├── __main__.py
│   ├── _util.py
│   └── app.py
├── pyproject.toml
├── README.md
└── .gitignore
  • app.py: Your Shiny app goes here.
  • __main__.py: Enables python -m myapp or uv run myapp.
  • _util.py: Place for helper functions.
  • pyproject.toml: Declares your app as a package.
  • .gitignore: Standard Python and venv ignores.

📦 Packaging an Existing Shiny App

If you already have a directory with app.py, you can turn it into a Python package using:

shinypkg pack myapp

This will create a new project directory with the same structure as shinypkg create, wrapping your app in a minimal Python package layout.

✨ Features

  • Minimal Shiny app starter
  • Works seamlessly with uv, uvx, and pipx
  • CLI and Python module compatible
  • Auto-fills Git author info if available
  • Optionally initializes a Git repo
  • Turn an existing app into a package
  • Suitable for beginners and reproducible teaching setups

🧑‍🏫 For Teaching

This project minimizes friction for learners. It separates user-editable files from internal logic, avoids deep nesting, and produces working apps with a single command. Ideal for:

  • Classroom instruction
  • Online tutorials
  • Hands-on workshops

📄 License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shinypkg-0.2.0.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shinypkg-0.2.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file shinypkg-0.2.0.tar.gz.

File metadata

  • Download URL: shinypkg-0.2.0.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for shinypkg-0.2.0.tar.gz
Algorithm Hash digest
SHA256 44ff19f9275bb517c07aac3732a0fd5f39e0cd81abc0a74d4690c2d238f54a9f
MD5 8ea9c3d6670e27d3e79a36c936d51646
BLAKE2b-256 7e6be36b17dd6ecebc5de8aea914c1e00c4794e9282227575b12173223cddff9

See more details on using hashes here.

File details

Details for the file shinypkg-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: shinypkg-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for shinypkg-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f403e513072a4759c1341b96e89e609226b4ca7b23501aaa4d03ad6d3c4b71d9
MD5 abc9edbbf466a31fb46b41f6f7b08e3b
BLAKE2b-256 8e08455b66a8f89788edcb229fe15a94480c2a0f766460db3f2064825e300b65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page