cookiecutter-py-shiny
is a cookiecutter
template for creating an elementary Shiny for Python package using poetry
. It is a clone of the cookiecutter template developed in the Python Packages book by Tomas Beuzen and Tiffany Timbers but can be used independently.
Note: Please read the Usage section in the original cookiecutter's repository to learn more about the Python-package-specific features included.
Developing a Shiny application is a great experiences. Shiny lends itself to being a rapid development framework; however, due to my own messiness, I often find myself spending time recreating UI components or copying files/folders from other projects I've developed. Hence, it was obvious to make a cookiecutter
template dedicated for Shiny projects in Python.
If interested, please follow the steps below to create your own Shiny for Python
project. If the default project template does not meet your needs, feel free to fork your own copy and make the necessary edits. This will be an ongoing project, so check back in for updates in the future.
-
Install
cookiecutter
:pip install cookiecutter
-
Generate a Python package structure using
cookiecutter-py-shiny
:cookiecutter /~https://github.com/lucas-nelson-uiuc/cookiecutter-py-shiny.git
-
After responding to the prompts you should have a directory structure similar to that shown below. To learn more about the contents of this directory structure, please see the
py-pkgs-cookiecutter
documentation.pkg ... package docs, GitHub workflows ... ├── src ┐ │ └── pkg │ Package source code, metadata, │ ├── __init__.py │ and build instructions │ └── pkg.py | │ └── templates | UI components │ └── icons.py | │ └── pages | │ └── modules ┘ Server modules ... package tests ...
in progress
Thank you to the work of Tomas, Tiffany, Daniel, and DC, the lead contributors of the py-pkgs-cookiecutter
template that this is built on top of. All credit from a packaging perspective should be geared towards them.
Thank you to Shiny for Python
as well for being this beautiful framework I've grown close with over the years. All credit from a web application perspective should be geared towards the wonderful folks on Posit's Shiny team.