diff --git a/marimo/_dependencies/dependencies.py b/marimo/_dependencies/dependencies.py index b6585225bb4..29e68d97747 100644 --- a/marimo/_dependencies/dependencies.py +++ b/marimo/_dependencies/dependencies.py @@ -121,3 +121,8 @@ def has_anywidget() -> bool: def has_watchdog() -> bool: """Return True if watchdog is installed.""" return importlib.util.find_spec("watchdog") is not None + + @staticmethod + def has_ipython() -> bool: + """Return True if IPython is installed.""" + return importlib.util.find_spec("IPython") is not None diff --git a/marimo/_output/builder.py b/marimo/_output/builder.py index f765cdce382..786f635be9d 100644 --- a/marimo/_output/builder.py +++ b/marimo/_output/builder.py @@ -93,6 +93,7 @@ def iframe( height: Optional[str] = None, style: Optional[str] = None, onload: Optional[str] = None, + **kwargs: str, ) -> str: params: List[Tuple[str, Union[str, None]]] = [] if src: @@ -107,6 +108,8 @@ def iframe( params.append(("style", style)) if onload: params.append(("onload", onload)) + for key, value in kwargs.items(): + params.append((key, value)) if len(params) == 0: return "