Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@ __marimo__
# pixi environments
.pixi
*.egg-info

# mkdocs
site
21 changes: 0 additions & 21 deletions docs/api/inspect.md

This file was deleted.

22 changes: 22 additions & 0 deletions docs/api/miscellaneous.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,25 @@
::: marimo.notebook_dir

::: marimo.notebook_location

## Inspect

Use `mo.inspect()` to explore Python objects with a rich, interactive display of their attributes, methods, and documentation.

### Example

```python
import marimo as mo

# Inspect a class
mo.inspect(list, methods=True)

# Inspect an instance
my_dict = {"key": "value"}
mo.inspect(my_dict)

# Show all attributes including private and dunder
mo.inspect(my_dict, all=True)
```

::: marimo.inspect
2 changes: 1 addition & 1 deletion docs/guides/configuration/runtime_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cells.

<video controls width="100%" height="100%" align="center" src="/_static/docs-runtime-config.mp4"> </video>

## Disable autorun on startup
## Disable autorun on startup { #on-startup }

By default, marimo notebooks run automatically on startup; just how the command

Expand Down
14 changes: 7 additions & 7 deletions docs/guides/deploying/scheduled.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ marimo notebooks are stored as Python files, so any system that can schedule a P

## Github Actions

As an alternative to using [cron](https://en.wikipedia.org/wiki/Cron) directly, you might be interested in running scheduled marimo notebooks as part of your [Github actions](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#schedule) workflow. You can use the code below as a starting point. Note that this example assumes you're using [inline dependencies](guides/package_management/inlining_dependencies).
As an alternative to using [cron](https://en.wikipedia.org/wiki/Cron) directly, you might be interested in running scheduled marimo notebooks as part of your [Github actions](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#schedule) workflow. You can use the code below as a starting point. Note that this example assumes you're using [inline dependencies](../package_management/inlining_dependencies.md).

```yaml
name: Run marimo notebook every day at 09:00
Expand All @@ -16,30 +16,30 @@ jobs:
jobs:
run-marimo:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"

- name: Use uv to run notebook as normal script
run: |
uv run path/to/marimo_notebook.py
```

## Alternatives

For tools like Airflow and Prefect, you can also choose to reuse parts of a marimo notebook in larger Python batch jobs. Check the [docs on reusing functions](https://docs.marimo.io/guides/reusing_functions/) if you're interested in that.
For tools like Airflow and Prefect, you can also choose to reuse parts of a marimo notebook in larger Python batch jobs. Check the [docs on reusing functions](https://docs.marimo.io/guides/reusing_functions/) if you're interested in that.

Alternatively, you may be interested in having specific cells in marimo run on an automated schedule as you have the notebook open. The simplest way to do that is to use the [mo.ui.refresh](https://docs.marimo.io/api/inputs/refresh/#marimo.ui.refresh) widget to manually specify how often a cell needs to rerun.

Finally, if you have very custom needs, you can always use third party Python libraries (like [schedule](https://schedule.readthedocs.io/en/stable/index.html)) to set up something bespoke from your own code.
Finally, if you have very custom needs, you can always use third party Python libraries (like [schedule](https://schedule.readthedocs.io/en/stable/index.html)) to set up something bespoke from your own code.
8 changes: 4 additions & 4 deletions docs/guides/generate_with_ai/prompts.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
marimo offers many tools for [AI assisted coding](/guides/editor_features/ai_completion/). However, sometimes you may want to do something more custom and could benefit from a prompt template to get started from. The goal of this page is to share prompts that have proven to be useful and will help you get started on specific tasks.
marimo offers many tools for [AI assisted coding](../editor_features/ai_completion.md). However, sometimes you may want to do something more custom and could benefit from a prompt template to get started from. The goal of this page is to share prompts that have proven to be useful and will help you get started on specific tasks.

You can add these prompts to your [custom rules](/guides/editor_features/ai_completion/?h=#custom-rules) but be mindful that doing so will make every call to the LLM more expensive because you're feeding it more tokens. That's why we generally recommend to start your conversations with these snippets if you don't plan on using them very often.
You can add these prompts to your [custom rules](../editor_features/ai_completion.md#custom-rules) but be mindful that doing so will make every call to the LLM more expensive because you're feeding it more tokens. That's why we generally recommend to start your conversations with these snippets if you don't plan on using them very often.

## CLAUDE.md

You can run [claude code](https://www.anthropic.com/claude-code) in the terminal and ask it to edit a marimo notebook on your behalf. Make sure that you run your notebook with the [watch flag](/api/watch) turned on, like `marimo edit --watch notebook.py`, to see updates appear live whenever claude makes a change.
You can run [claude code](https://www.anthropic.com/claude-code) in the terminal and ask it to edit a marimo notebook on your behalf. Make sure that you run your notebook with the [watch flag](../..//api/watch.md) turned on, like `marimo edit --watch notebook.py`, to see updates appear live whenever claude makes a change.

To help claude code, you might want to take the snippet below as starting context for your `CLAUDE.md` file. This snippet should be seen as a starting point and we recommend adding extra context yourself. Things like "prefer polars over pandas" to indicate your preferred libraries and tools.

Expand All @@ -22,7 +22,7 @@ curl https://docs.marimo.io/CLAUDE.md > CLAUDE.md

## Anywidget

If you want to generate [custom UIs or widgets for marimo](/api/inputs/anywidget/?h=anywidget#building-custom-ui-elements) then anywidget is the way to go. Because anywidget is a fairly revent project, LLMs have been known to hallucinate when you try to generate custom widgets from scratch. The following prompt contains an example that helps prevent this behaviour and it also points out common failure scenarios that the LLM should avoid.
If you want to generate [custom UIs or widgets for marimo](../../api/inputs/anywidget.md?#building-custom-ui-elements) then anywidget is the way to go. Because anywidget is a fairly revent project, LLMs have been known to hallucinate when you try to generate custom widgets from scratch. The following prompt contains an example that helps prevent this behaviour and it also points out common failure scenarios that the LLM should avoid.

```
When writing an anywidget use vanilla javascript in `_esm` and do not forget about `_css`. The css should look bespoke in light mode and dark mode. Keep the css small unless explicitly asked to go the extra mile. When you display the widget it must be wrapped via `widget = mo.ui.anywidget(OriginalAnywidget())`.
Expand Down
2 changes: 1 addition & 1 deletion marimo/_plugins/stateless/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class inspect(Html):
value: Show the object's value/repr.

Returns:
An `Html` object.
(Html): An `Html` object.

Example:
```python
Expand Down
9 changes: 8 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ nav:
- Import star: guides/understanding_errors/import_star.md
- Cycles: guides/understanding_errors/cycles.md
- Setup References: guides/understanding_errors/setup.md
- Debugging notebooks: guides/debugging.md
- Lint Rules:
- Lint Rules: guides/lint_rules/index.md
- Rules:
Expand Down Expand Up @@ -204,6 +205,7 @@ nav:
- Chat: api/inputs/chat.md
- Checkbox: api/inputs/checkbox.md
- Code Editor: api/inputs/code_editor.md
- Data Editor: api/inputs/data_editor.md
- Data Explorer: api/inputs/data_explorer.md
- DataFrame: api/inputs/dataframe.md
- Dates: api/inputs/dates.md
Expand Down Expand Up @@ -239,15 +241,16 @@ nav:
- Plain: api/layouts/plain.md
- Routes: api/layouts/routes.md
- Sidebar: api/layouts/sidebar.md
- Stat: api/layouts/stat.md
- Stacks: api/layouts/stacks.md
- Stat: api/layouts/stat.md
- Tree: api/layouts/tree.md
- Plotting: api/plotting.md
- Media:
- Media: api/media/index.md
- Audio: api/media/audio.md
- Download: api/media/download.md
- Image: api/media/image.md
- Image Compare: api/media/image_compare.md
- PDF: api/media/pdf.md
- Plain Text: api/media/plain_text.md
- Video: api/media/video.md
Expand All @@ -261,6 +264,7 @@ nav:
- State: api/state.md
- App: api/app.md
- Cell: api/cell.md
- Watch: api/watch.md
- Miscellaneous: api/miscellaneous.md
- Commands: cli.md
- FAQ: faq.md
Expand Down Expand Up @@ -379,3 +383,6 @@ theme:
toggle:
icon: material/brightness-4
name: Switch to system preference

exclude_docs: |
apps/README.md
37 changes: 16 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,26 +125,6 @@ mcp = [
"pydantic>2; python_version >= '3.10'",
]


docs = [
"mkdocs>=1.6.1",
"mkdocs-material>=9.5.49",
"mkdocstrings[python]>=0.27.0",
"mkdocs-material-extensions>=1.3.1",
"mkdocs-autorefs>=1.2.0",
"mkdocs-git-revision-date-localized-plugin>=1.3.0",
"mkdocs-minify-plugin>=0.8.0",
"mkdocs-glightbox>=0.4.0",
"mkdocs-macros-plugin>=1.3.7",
"mkdocs-redirects>=1.2.2",
"mkdocs-click>=0.8.1",
"mike>=2.0.0", # for versioning
"pillow>=10.2.0,!=11.3.0", # for social cards, 11.3.0 doesn't have manylinux wheels
"cairosvg>=2.7.1", # for social cards
"mdx-include>=1.4.2",
"pymdown-extensions>=10.7",
]

[tool.hatch]
installer = "uv"

Expand Down Expand Up @@ -304,10 +284,25 @@ extra-dependencies = [
python = ["3.9", "3.10", "3.11", "3.12", "3.13"]

[tool.hatch.envs.docs]
features = ["docs"]
dependencies = [
"marimo_docs @ file://docs",
"ruff>=0.13.1",
"mkdocs>=1.6.1",
"mkdocs-material>=9.5.49",
"mkdocstrings[python]>=0.27.0",
"mkdocs-material-extensions>=1.3.1",
"mkdocs-autorefs>=1.2.0",
"mkdocs-git-revision-date-localized-plugin>=1.3.0",
"mkdocs-minify-plugin>=0.8.0",
"mkdocs-glightbox>=0.4.0",
"mkdocs-macros-plugin>=1.3.7",
"mkdocs-redirects>=1.2.2",
"mkdocs-click>=0.8.1",
"mike>=2.0.0", # for versioning
"pillow>=10.2.0,!=11.3.0", # for social cards, 11.3.0 doesn't have manylinux wheels
"cairosvg>=2.7.1", # for social cards
"mdx-include>=1.4.2",
"pymdown-extensions>=10.7",
]

[tool.uv.sources]
Expand Down
Loading