dash-loading-shimmer
A shimmer pre-load component for Plotly Dash. Check out sampleapp.py for a very minimal example.
Installation
Get it with pip: pip install dash-loading-extras
Or maybe you prefer uv: uv add dash-loading-extras
Usage
See sampleapp.py for a simple Dash app example, or use Shimmer like you would a dcc.Loading component. Wrap it around any components you want to shimmer while loading and don't stop 'til morning.
from dash import Dash, html, dcc
import dash_loading_extras as loading
app = Dash()
app.css.config.serve_locally=True
app.layout = html.Div([
html.H1("A Long Loading Graph"),
html.H2("It's worth the wait!"),
loading.Shimmer(
dcc.Graph(figure=fig, id="graph"),
app=app,
# show_spinner=True # optionally keep the loading animation on top of the shimmering element
),
])
app.run()
If you want to tweak the CSS used, inject your own CSS before Shimmer gets there with the shimmer_css function. Common styles to tweak are the opacity, hue, and speed of the shimmer
import dash_loading_extras as loading
app = Dash()
loading.ASSETSDIR = "path/to/your/cssassets/folder"
loading.shimmer_css(app=app, path="my_better_shimmer.css")
app.layout = ...
Deploying the sample app
sampleapp.py runs on Google App Engine standard (F1 instance, scales to zero, within the free tier), as the dash-loading-shimmer service. App Engine installs from requirements.txt and imports dash_loading_extras straight from the source tree.
- Install the Google Cloud SDK, then
gcloud initand pick your project - If you changed dependencies, regenerate
requirements.txt:uv export --no-dev --group sampleapp --no-emit-project --no-hashes -o requirements.txt - Deploy with
gcloud app deploy - View it with
gcloud app browse -s dash-loading-shimmer
Pushes to main deploy automatically via the Deploy workflow. Pushes to develop upload a preview version that gets no traffic, at https://develop-dot-dash-loading-shimmer-dot-ladders-dash.uc.r.appspot.com. The workflow needs a GCP_SA_KEY Actions secret (service-account key JSON). It also fails if requirements.txt is out of date with uv.lock.
App Engine requires a project's first service to be default, so in a brand new project remove the service: line from app.yaml for the first deploy.
Releasing
The Release workflow publishes to PyPI based on the version in pyproject.toml. It needs a PYPI_API_TOKEN Actions secret.
- Merge to
main: if that version isn't tagged yet, it's published to PyPI and tagged (v<version>) with a GitHub release. To release, bump the version (uv version --bump patch) and merge tomain. - Merge to
develop: a dev pre-release<version>.dev<N>is published (N is the workflow run number). If the version is already released, dev builds count towards the next patch version. Install one withpip install --pre dash_loading_extras.
Future Work
Open to ideas! So far there's:
- Customize shimmer styles (programmatically generating CSS at runtime)
- More loaders (spinning, bouncing, erupting?)
- Remove need to pass
appintoShimmercall
Metadata
Release files for dash-loading-extras 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dash_loading_extras-0.1.4.tar.gz | 5.1 kB | Without provenance | Details for dash_loading_extras-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dash_loading_extras-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for dash_loading_extras-0.1.4-py3-none-any.whl |
Total release size: 10.5 kB
Release files / dash_loading_extras-0.1.4.tar.gz
| Download URL | dash_loading_extras-0.1.4.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc39aeaeaa4b97c8dc7782bd3028a6746deae2781cdd0613c9f0f11c7f1fb624
|
|
BLAKE2b-256 checksum How to use checksums |
48e23fb366d2e4992c790b1d2167a58607ab771856958d1453003287438f6778
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / dash_loading_extras-0.1.4-py3-none-any.whl
| Download URL | dash_loading_extras-0.1.4-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63ade209b23acabd534211df1cf4c15b99b302ed63c0134f79736e9da04a0ecd
|
|
BLAKE2b-256 checksum How to use checksums |
9749bdcb6b41239a5a68d20dd50f9196a34e4f6ee7aeaff72bcb04a8e8036cc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for dash-loading-extras 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.