Bootswatch + Bootstrap 5 themes for Shiny.
Reason this release was yanked:
prerelease version
Project description
shinyswatch
Bootswatch + Bootstrap 5 themes for Shiny.
Installation
pip install shinyswatch
To install the latest development version from this repository:
pip install https://github.com/schloerke/py-shinyswatch/tarball/main
Usage
Add your theme anywhere within your App's UI defintion. For example:
from shiny import App, Inputs, Outputs, Session, render, ui
import shinyswatch
app_ui = ui.page_fluid(
shinyswatch.theme("darkly"),
ui.input_slider("num", "Number:", min=10, max=100, value=30),
ui.output_text_verbatim("slider_val"),
)
def server(input: Inputs, output: Outputs, session: Session):
@output
@render.text
def slider_val():
return f"{input.num()}"
app = App(app_ui, server)
Examples
There are two examples in the shinyswatch repo. After checking out the repo, you can run them by calling:
python3 -m shiny run examples/basic-darkly/app.py
python3 -m shiny run examples/big-sketchy/app.py
Development
If you want to do development on shinyswatch for Python:
pip install -e ".[dev,test]"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shinyswatch-0.1.1.tar.gz
(935.5 kB
view hashes)
Built Distribution
shinyswatch-0.1.1-py3-none-any.whl
(867.8 kB
view hashes)
Close
Hashes for shinyswatch-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efac8e866f72214bd900b31ba01e8ada8e43b7403c08dc757126c5b96165de97 |
|
MD5 | 92a945cdc5e96f04b06c340b73533156 |
|
BLAKE2b-256 | 89adf897c2b389f9dc193da4c50bd92ac6f3536d2d136878cf2764e810b6e9ed |