Skip to main content

Dash Grocery

Dash Grocery is a collection of Dash components that wrap useful React libraries.

Install

pip install dash-grocery

Dash Grocery requires Dash 4.5.0 or later.

Quickstart

from dash import Dash, html
import dash_grocery

app = Dash(__name__)

app.layout = html.Div(
    [
        dash_grocery.Clock(
            format="dddd, MMMM Do, YYYY, HH:mm:ss",
            ticking=True,
        ),
        dash_grocery.Barcode(value="dash-grocery", format="CODE128"),
        dash_grocery.QRCodeSVG(value="https://github.com/IcToxi/dash-grocery"),
    ]
)

if __name__ == "__main__":
    app.run(debug=True)

Components

Component Wraps
Barcode react-barcode
Clock react-live-clock
GridLayout react-grid-layout
LazyLoad react-lazyload
Masonry react-masonry-component
MouseParticles react-mouse-particles
Particles tsParticles (slim bundle)
ParticlesBg particles-bg
PowerModeInput power-mode-input
QRCodeCanvas, QRCodeSVG qrcode.react
Snake Built-in; keyboard and on-screen controls
Stars Local implementation (replaces unmaintained react-stars)
Textfit react-textfit
Weather react-open-weather

Components accept their documented React properties as Dash properties. Use id to reference a component in callbacks; interactive components such as Stars and PowerModeInput expose their current value as a Dash property. See the examples for usage, and each component's propTypes in src/lib/components for supported properties.

Weather requires an API key from the selected weather provider. A key used in a browser is visible to users; restrict it with the provider and set usage limits. To use your own data, set option="custom" and pass customData in the format returned by the selected provider. A custom JavaScript func, when used outside Dash's JSON-based Python interface, receives the component props and returns {data, isLoading, errorMessage}.

Run an example

After installing the package, run an example from the repository root:

python -m examples.barcode_usage

Development

Install the JavaScript and Python development dependencies, then build the JavaScript bundle and generated Dash components. The project is tested with Python 3.15, Node.js 22, and Dash's experimental React 19.2.4 runtime:

YARN_NODE_LINKER=node-modules yarn
python -m pip install -r requirements.txt
YARN_NODE_LINKER=node-modules yarn lint
YARN_NODE_LINKER=node-modules yarn build
pytest tests

Run YARN_NODE_LINKER=node-modules yarn start to rebuild the development bundle whenever a source file changes.

To contribute a component, add its React wrapper under src/lib/components/, export it from src/lib/index.js, and add an example under examples/. yarn build:py_and_r also generates R wrappers and requires an author email in package.json.

Publishing to PyPI

This repository publishes distributions through GitHub Actions Trusted Publishing; no PyPI API token is needed. Before the first release, add a publisher under PyPI account settings → Publishing with:

  • PyPI project: dash-grocery
  • Owner: IcToxi
  • Repository: dash-grocery
  • Workflow: publish-to-pypi.yml
  • Environment: pypi

A release is published when a tag such as v0.1.2 matching the version in package.json is pushed. The publishing workflow builds and tests the package before uploading it to PyPI. It can also be started manually (workflow_dispatch) for an existing tag.

Automation

The repository maintains itself:

  • CI runs on every push and pull request, and weekly to catch upstream breakage (Dash, React, browsers).
  • Dependabot opens weekly grouped updates; passing minor/patch updates are merged automatically (dependabot-automerge.yml). Major updates are left for review.
  • Auto release (auto-release.yml) runs weekly. If main has dependency or source changes since the last tag and CI passed, it bumps the patch version, tags, creates the GitHub release and publishes to PyPI.

Not included

React Bits and Hover.dev are not bundled: they are copy-paste source collections whose licenses restrict redistribution of components inside another package.

Metadata

Release files for dash-grocery 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dash-grocery 0.2.0
File Size Uploaded Provenance Actions
dash_grocery-0.2.0.tar.gz 1.3 MB With provenance Details for dash_grocery-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dash-grocery 0.2.0
File Interpreter ABI Platform Actions
dash_grocery-0.2.0-py3-none-any.whl Python 3 none any Details for dash_grocery-0.2.0-py3-none-any.whl

Total release size: 2.5 MB

Release files / dash_grocery-0.2.0.tar.gz

Download URL dash_grocery-0.2.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
8b6edf8bb884e2fdfd3bb1f17a048ce0d75888561007095efc7dab684c8ab0c1
BLAKE2b-256 checksum
How to use checksums
20d9b154a737cdb623c5038ab0edbd3d82f89e83992b2d3237e740bb7272dfee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / dash_grocery-0.2.0-py3-none-any.whl

Download URL dash_grocery-0.2.0-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f5cc5a240b82090d973a8664da851bb8938eac87dfd0d38b13a987c00d792263
BLAKE2b-256 checksum
How to use checksums
8971b10861446f744f17acf7a423c4028430e477f2777451b3225e2c80dc3db4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for dash-grocery 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dash_grocery-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page