Skip to content

eoda-dev/shiny-for-python-getting-started

Repository files navigation

Shiny for Python Getting Started

Start from scratch

Create a Python Shiny environment:

uv init [-p 3.9]
uv add shiny

source .venv/bin/activate

shiny --version

shiny --help

shiny create --help

Create a new Shiny Express app from template:

shiny create -d basic_app -t basic-app -m express

shiny run basic_app/app.py

Use templates from GitHub

shiny create -g eoda-dev/py-shiny-templates -t fastapi-routes

shiny create -g posit-dev/py-shiny-templates -t map-distance

Deployment

To run Shiny apps in production you should use gunicorn or uvicorn:

uv add gunicorn

shiny create -d basic_app_core -t basic-app -m core

gunicorn basic_app_core.app:app -w 4 -k uvicorn.workers.UvicornWorker

Examples

Docker Image Releases

Shinylive inside nginx

docker pull ghcr.io/eoda-dev/shinylive-nginx:latest

docker run --rm -p 8085:80 ghcr.io/eoda-dev/shinylive-nginx:latest

Navigate to http://localhost:8085/shinylive-app/

Shiny and FastAPI in one app

docker pull ghcr.io/eoda-dev/shiny-meets-fastapi:latest

docker run -p 3333:3333 --rm ghcr.io/eoda-dev/shiny-meets-fastapi:latest

Navigate to:

About

Shiny for Python Examples

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •