Registry / web-framework / shinyswatch

shinyswatch

JSON →
library0.11.0pypypi✓ verified 84d ago

Provides Bootswatch + Bootstrap 5 themes for Shiny for Python. Current version 0.10.0 (2026-03-20), requires Shiny >=1.6.0. Released irregularly on PyPI.

pip install shinyswatch
INSTALL
IMPORT
SIG · SHINYSWATCH
S
shinyswatch
web-frameworkpythonv0.11.0
Install
7.0s avg
Import
1405ms
Disk
87MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.11.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.494s · 89.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.0s · import 1.316s · 88MB
87MB installed
● package 87MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_theme
from shinyswatch import get_theme
import shinyswatch, then shinyswatch.get_theme('flatly')
Direct import works; the old way also works but is less explicit.
theme_picker_ui
from shinyswatch import theme_picker_ui
theme_picker_server
from shinyswatch import theme_picker_server

Minimal Shiny app using a shinyswatch theme (pass theme to page_* functions).

from shiny import App, ui from shinyswatch import get_theme app_ui = ui.page_fluid( ui.h1("Hello, shinyswatch!"), theme=get_theme("flatly"), ) app = App(app_ui, server=None)
Debug
Known issues
breakingSince v0.7.0, shinyswatch themes must be passed as the `theme` argument to `shiny.ui.page_*()` or `shiny.express.ui.page_opts()`, not added anywhere in the UI.
fix
Use `theme=get_theme('cerulean')` in the page layout function.
affects: >=0.7.0
breakingshinyswatch v0.7.0+ requires Shiny >=1.0.0; v0.10.0 requires Shiny >=1.6.0.
fix
Update Shiny: `pip install -U shiny`
affects: >=0.7.0
breakingIn v0.5.0, `get_theme(name)` now returns a callable class instance. To get HTML dependencies, call the object or use `get_theme_deps(name)`.
fix
Use `theme = get_theme('yeti')` and pass directly to page; use `get_theme_deps('yeti')` if you need dependencies.
affects: >=0.5.0
deprecatedThe `default` argument in `theme_picker_ui()` is deprecated since v0.7.0. Pass initial theme via the server function instead.
fix
Use `theme_picker_server(input, output, session, initial='darkly')` and omit `default` from UI.
affects: >=0.7.0
gotchaOnly one theme picker is allowed per app at a time, especially when used with dynamic UI (since v0.9.0).
fix
Ensure only one `theme_picker_ui` is rendered in the application.
affects: >=0.9.0
Errors
Common errors & fixes
TypeError: 'Theme' object is not callable
Trying to call a shinyswatch theme object as a function in a context where it expects HTML dependencies (common after v0.5.0).
fix
Use `shinyswatch.get_theme('flatly')` directly in the `theme` argument, or use `shinyswatch.get_theme_deps('flatly')` for explicit dependencies.
ImportError: cannot import name 'theme' from 'shinyswatch'
Trying to import `shinyswatch.theme` as a module after v0.7.0, where themes are now objects from `get_theme`.
fix
Use `from shinyswatch import get_theme` and then `get_theme('flatly')`.
ModuleNotFoundError: No module named 'shiny'
Missing Shiny installation; shinyswatch depends on Shiny.
fix
Install Shiny: `pip install shiny`
TypeError: page_fluid() got an unexpected keyword argument 'theme'
Using an older version of Shiny that does not support the `theme` parameter in page functions (Shiny <1.0.0).
fix
Upgrade Shiny to >=1.0.0: `pip install -U shiny`
Upgrade
Version history
0.11.0latest on PyPI · released Jun 1, 2026
Audit
Dependencies
shinyrequiredCore dependency: shinyswatch requires Shiny >=1.6.0 (v0.10.0).
Agent activity
3 hits · last 30 days
node
2
Resources
shinyswatch — pip install shinyswatch · libregistry