Miscellaneous¶
- marimo.running_in_notebook() bool¶
Returns True if running in a marimo notebook, False otherwise
- marimo.defs() tuple[str, ...]¶
Get the definitions of the currently executing cell.
Returns:
tuple of the currently executing cell’s defs.
- marimo.refs() tuple[str, ...]¶
Get the references of the currently executing cell.
Returns:
tuple of the currently executing cell’s refs.
- marimo.notebook_dir() pathlib.Path | None¶
Get the directory of the currently executing notebook.
Returns:
A
pathlib.Pathobject representing the directory of the current notebook, orNoneif the notebook’s directory cannot be determined.
Examples:
data_file = mo.notebook_dir() / "data" / "example.csv" # Use the directory to read a file if data_file.exists(): print(f"Found data file: {data_file}") else: print("No data file found")
- class marimo.Thread(*args: Any, **kwargs: Any)¶
A Thread subclass that is aware of marimo internals.
mo.Threadhas the same API as threading.Thread, butmo.Threads are able to communicate with the marimo frontend, whereasthreading.Threadcan’t.