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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 1.494s · 89.1MB
glibcpy 3.10–3.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)
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).
fixUse `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`.
fixUse `from shinyswatch import get_theme` and then `get_theme('flatly')`. ModuleNotFoundError: No module named 'shiny'
Missing Shiny installation; shinyswatch depends on Shiny.
fixInstall 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).
fixUpgrade 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).