Skip to main content

No project description provided

Project description

moutils

Utility functions used in marimo.

[!NOTE] This is a community led effort and not actively prioritized by the core marimo team.

Installation

pip install moutils

or with uv:

uv add moutils

Included

URLHash

Widget for interacting with URL hash. Allows you to get and set the hash portion of the URL.

URLPath

Widget for interacting with URL path. Allows you to get and set the current URL path.

DOMQuery

Widget for querying DOM elements. Use CSS selectors to find and interact with elements on the page.

CookieManager

Widget for managing browser cookies. Get, set, and monitor browser cookies.

StorageItem

Widget for interacting with browser storage (local/session). Access and manipulate data in browser's localStorage or sessionStorage.

Slot

Widget for creating a slot that can contain HTML and handle DOM events. Supports a wide range of events:

  • Mouse events (click, hover, etc.)
  • Keyboard events
  • Form events
  • Drag and drop
  • Touch events
  • Pointer events
  • Scroll events
  • Clipboard events
  • Animation and transition events

CopyToClipboard

Widget for copying text to clipboard. Provides a button to copy text and shows success feedback.

ShellWidget

Interactive shell command widget for running terminal commands in notebooks. Features:

  • Real-time output streaming
  • Cross-platform support (Windows, macOS, Linux)
  • Working directory specification
  • Asynchronous execution
  • Error handling and status reporting

Use the convenience function shell() or the ShellWidget class directly:

from moutils import shell

# Simple command
shell("ls -la")

# With working directory
shell("npm install", working_directory="./frontend")

Development

We use uv for development.

uv run marimo edit notebooks/example.py

Installing pre-commit

uv tool install pre-commit
pre-commit

Testing

uvx --with anywidget pytest tests

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

moutils-0.3.8.tar.gz (90.6 kB view details)

Uploaded Source

Built Distribution

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

moutils-0.3.8-py2.py3-none-any.whl (41.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file moutils-0.3.8.tar.gz.

File metadata

  • Download URL: moutils-0.3.8.tar.gz
  • Upload date:
  • Size: 90.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.19

File hashes

Hashes for moutils-0.3.8.tar.gz
Algorithm Hash digest
SHA256 566fd68ea04fb8e2f5719dc32e8de9833448ea8cf8bbb7f005f082605437e38a
MD5 d6abbc3f58b3ac4187461e5ff61e0dda
BLAKE2b-256 cd1e12d87e517d7112cf41b6ec08d95f2e071020b9f3d24f3bba9d7faa12d0d7

See more details on using hashes here.

File details

Details for the file moutils-0.3.8-py2.py3-none-any.whl.

File metadata

  • Download URL: moutils-0.3.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 41.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.19

File hashes

Hashes for moutils-0.3.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3a49e96b3b6dd30a18f6e1d7f9b759ee69cda80d19ae12172111afb37758d0d8
MD5 009f4a96ebed858faa28dae675ce813f
BLAKE2b-256 9f6f5392332bbdd7cdaf6a8a5b9ab097107fb9a5a1f2ae5cb786978eafb1ed7b

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