This repository hosts source files behind Shiny for Python templates.
To install dependencies for every template, run:
make install
To install dependencies for a specific template, use the requirements.txt
file in the template's directory. For example:
pip install -r basic-app-plot/requirements.txt
From the terminal, you can then run a template like so:
shiny run basic-app-plot/app-core.py
Alternatively, open the app file of interest in VSCode and run it from there.
Apps are automatically deployed to shinyapps.io. This should just work for applications that have been previously deployed, but you need to follow a few steps to deploy a new application. Each deployment retries three times to avoid spurious failures, and caches the result so as not to redeploy applications which have not changed since the last successful deployment.
- Create a new folder for the application, the folder should contain at least an
app-core.py
file and arequirements.txt
file. Optionally add anapp-express.py
file if you want to give people the option to use Shiny Express.
- Make sure also to add this
requirements.txt
file to the root./requirements.txt
file.
-
Deploy the app to shinyapps.io in the
gallery
account, if you don't have access to this account mention it in the PR and a member of the Shiny team will do this and the following step for you. -
Add your application to
deployments.json
, you will need to login to shinyapps.io to get the guid.
- Note that this
guid
is the same as theapp_id
left in thersconnect-python/
manifest created byrsconnect deploy shiny
.
- Raise a PR with your changes