Skip to main content

Widgets to use with marimo notebooks

Project description

dr_widget

dr_widget is a hybrid Python/Svelte project for building reusable AnyWidget components that can be dropped into Marimo notebooks today and exported to full Svelte apps later. The repository currently ships a Config File Manager widget, but the layout is designed to host additional widgets.

Quick Start

# Install JS dependencies (root + workspace)
bun install

# Live-reload the Config File Manager widget in a browser
bun run dev:config-file-manager

# Produce the optimized bundle used by AnyWidget
bun run build

# Build the Python distributions (wheel + sdist)
uv build

# Launch the Marimo demo notebook
marimo run notebooks/config_file_manager_widget.py

Prerequisites: Bun ≥ 1.0, Node-compatible environment, Python ≥ 3.11 with uv, and Marimo ≥ 0.17.6.

Repository Layout

  • src/dr_widget/ – Python package exposing AnyWidget classes.
    • widgets/config_file_manager/ – widget workspace (Svelte source in src/, build output in static/).
      • src/ConfigFileManager.svelte – orchestration layer wiring bindings into the panel components.
      • src/lib/hooks/use-file-bindings.ts – shared logic for syncing AnyWidget traitlets.
      • src/lib/components/ – shadcn-style UI primitives and panels, including a config viewer card with both a tree view and graph view for JSON payloads.
  • docs/ – additional reference material (architecture, development workflows).
  • notebooks/config_file_manager_widget.py – Marimo notebook that exercises the Config File Manager widget.

Documentation

Contributing

  1. Work inside a dedicated branch.
  2. Run bun run build, npx svelte-check, and uv build before opening a PR.
  3. Update the notebook and docs when you add or change widget behaviour.
  4. Follow the commit and PR practices outlined in AGENTS.md.

Please open an issue if you hit build problems or want to discuss new widgets.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dr_widget-0.1.5.tar.gz (582.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dr_widget-0.1.5-py3-none-any.whl (636.0 kB view details)

Uploaded Python 3

File details

Details for the file dr_widget-0.1.5.tar.gz.

File metadata

  • Download URL: dr_widget-0.1.5.tar.gz
  • Upload date:
  • Size: 582.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.7

File hashes

Hashes for dr_widget-0.1.5.tar.gz
Algorithm Hash digest
SHA256 463c964812343d5b0a5140a72307e52d24d85e9e7b8f434b72f354a77fea305e
MD5 602ec9ad8df8f3b248d39dcca80c71c8
BLAKE2b-256 46a7a2952a1237e42f1c6294833ceaeba610096a11304637d0e3f74350d05063

See more details on using hashes here.

File details

Details for the file dr_widget-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: dr_widget-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 636.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.7

File hashes

Hashes for dr_widget-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fd6c4a2fa1d5a43b4a257cc74f8e2884eafeab98ee677bcec2892c133c7dcb22
MD5 98f3b7fb6a070e374877c628b22d06df
BLAKE2b-256 1805882611fee54a1ce0f96e96a5eb4cab63cf3cf02cdd07e2eea9da4586bc54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page