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.
Specific notebook
uv run marimo edit notebooks/example.py
Workspace
uv run --active marimo edit --port 2718
Installing pre-commit
uv tool install pre-commit
pre-commit
Testing
To run all tests (including environment detection and OAuth device flow):
pytest -v tests/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file moutils-0.3.12.tar.gz.
File metadata
- Download URL: moutils-0.3.12.tar.gz
- Upload date:
- Size: 108.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6380fe05349ebafe016be70d1c8569dc349b23212790963c81e5bffa336ca162
|
|
| MD5 |
85eb2a8e2ec3b4f500fc64815da08c5e
|
|
| BLAKE2b-256 |
b3364435c811526bdc505085a9b7257ba3921e4cf18f416e3bc4976a215e47c4
|
File details
Details for the file moutils-0.3.12-py2.py3-none-any.whl.
File metadata
- Download URL: moutils-0.3.12-py2.py3-none-any.whl
- Upload date:
- Size: 44.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
184d0e4427f7c9dd217c06490b1294762926595b1db291735359a3cb43dda79f
|
|
| MD5 |
16b10eb93712a0cbe7efbd68ba3e272f
|
|
| BLAKE2b-256 |
3dbc01e1a05e8ade9e030b5916ce62c275f7f75c0be9ce2dd79a97d988e95de6
|