marimo-team / marimo

A reactive notebook for Python — run reproducible experiments, execute as a script, deploy as an app, and version with git.
https://marimo.io
Apache License 2.0
5.31k stars 155 forks source link

improvement: proxy attributes for `mo.ui.anywidget` #1694

Closed mscolnick closed 3 days ago

mscolnick commented 3 days ago

This allows you to access attributes directly on the original widget

from drawdata import ScatterWidget
import marimo as mo

scatter = ScatterWidget()
scatter = mo.ui.anywidget(scatter)

# In another cell, access its value
# This works for all widgets
scatter.value

# Or attributes specifically on the ScatterWidget
scatter.data_as_pandas
scatter.data_as_polars
vercel[bot] commented 3 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2024 9:10pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2024 9:10pm