Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

docs improvements (#2402)

Akshay Agrawalc1ae1996fa23
diff --git a/docs/guides/sql.md b/docs/guides/sql.md
index 1ddf793f5a..d37944b566 100644
--- a/docs/guides/sql.md
+++ b/docs/guides/sql.md
@@ -33,7 +33,9 @@ The SQL statement itself is an formatted string (f-string), so this means they c
## Reference a local dataframe
-You can reference a local dataframe in your SQL cell by using the name of the Python variable that holds the dataframe. If you have a database connection with a table of the same name, the database table will be used instead.
+You can reference a local dataframe in your SQL cell by using the name of the
+Python variable that holds the dataframe. If you have a database connection
+with a table of the same name, the database table will be used instead.
<div align="center">
<figure>
@@ -57,7 +59,9 @@ Defining a non-private (non-underscored) output variable in the SQL cell allows
## Querying files, databases, and APIs
-In the above example, you may have noticed we queried an HTTP endpoint instead of a local dataframe. We are not only limited to querying local dataframes; we can also query files, databases, and APIs:
+In the above example, you may have noticed we queried an HTTP endpoint instead
+of a local dataframe. We are not only limited to querying local dataframes; we
+can also query files, databases such as Postgres and SQLite, and APIs:
```sql
-- or
@@ -69,6 +73,7 @@ SELECT * FROM read_parquet('path/to/example.parquet');
```
For a full list you can check out the [duckdb extensions](https://duckdb.org/docs/extensions/overview).
+You can also check out our [examples on GitHub](https://github.com/marimo-team/marimo/tree/main/examples/sql).
## Interactive tutorial
@@ -79,3 +84,7 @@ marimo tutorial sql
```
at your command-line.
+
+## Examples
+
+Check out our [examples on GitHub](https://github.com/marimo-team/marimo/tree/main/examples/sql).
diff --git a/examples/README.md b/examples/README.md
index 65041819bc..396d44b748 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -31,6 +31,9 @@ comment. Here are the steps to open an example notebook:
> The [`--sandbox` flag](https://docs.marimo.io/guides/editor_features/package_management.html) opens the notebook in an isolated virtual environment,
> automatically installing the notebook's dependencies 📦
+You can also open notebooks without `uv`, with just `marimo edit <notebook.py>`;
+however, you'll need to install the requirements yourself.
+
## More examples 🌟
Every week, we highlight stellar examples and projects from our community.
diff --git a/examples/ai/README.md b/examples/ai/README.md
new file mode 100644
index 0000000000..f1d6aead9a
--- /dev/null
+++ b/examples/ai/README.md
@@ -0,0 +1,23 @@
+# AI 🤖
+
+These examples showcase a few simple applications of AI.
+
+> [!TIP]
+> Submit a
+> [pull request](https://github.com/marimo-team/marimo/pulls) to add an example!
+
+## Running examples
+
+The requirements of each notebook are serialized in them as a top-level
+comment. Here are the steps to open an example notebook:
+
+1. [Install marimo](https://docs.marimo.io/getting_started/index.html#installation)
+2. [Install `uv`](https://github.com/astral-sh/uv/?tab=readme-ov-file#installation)
+3. Open an example with `marimo edit --sandbox <notebook.py>`.
+
+> [!TIP]
+> The [`--sandbox` flag](https://docs.marimo.io/guides/editor_features/package_management.html) opens the notebook in an isolated virtual environment,
+> automatically installing the notebook's dependencies 📦
+
+You can also open notebooks without `uv`, with just `marimo edit <notebook.py>`;
+however, you'll need to install the requirements yourself.
diff --git a/examples/cloud/README.md b/examples/cloud/README.md
new file mode 100644
index 0000000000..c217decdbb
--- /dev/null
+++ b/examples/cloud/README.md
@@ -0,0 +1,23 @@
+# Cloud ☁️
+
+These examples show how to use various cloud provider APIs.
+
+> [!TIP]
+> Submit a
+> [pull request](https://github.com/marimo-team/marimo/pulls) to add an example!
+
+## Running examples
+
+The requirements of each notebook are serialized in them as a top-level
+comment. Here are the steps to open an example notebook:
+
+1. [Install marimo](https://docs.marimo.io/getting_started/index.html#installation)
+2. [Install `uv`](https://github.com/astral-sh/uv/?tab=readme-ov-file#installation)
+3. Open an example with `marimo edit --sandbox <notebook.py>`.
+
+> [!TIP]
+> The [`--sandbox` flag](https://docs.marimo.io/guides/editor_features/package_management.html) opens the notebook in an isolated virtual environment,
+> automatically installing the notebook's dependencies 📦
+
+You can also open notebooks without `uv`, with just `marimo edit <notebook.py>`;
+however, you'll need to install the requirements yourself.
diff --git a/examples/misc/README.md b/examples/misc/README.md
new file mode 100644
index 0000000000..6e924c6614
--- /dev/null
+++ b/examples/misc/README.md
@@ -0,0 +1,23 @@
+# Misc ✨
+
+A hodgepodge of examples!
+
+> [!TIP]
+> Submit a
+> [pull request](https://github.com/marimo-team/marimo/pulls) to add an example!
+
+## Running examples
+
+The requirements of each notebook are serialized in them as a top-level
+comment. Here are the steps to open an example notebook:
+
+1. [Install marimo](https://docs.marimo.io/getting_started/index.html#installation)
+2. [Install `uv`](https://github.com/astral-sh/uv/?tab=readme-ov-file#installation)
+3. Open an example with `marimo edit --sandbox <notebook.py>`.
+
+> [!TIP]
+> The [`--sandbox` flag](https://docs.marimo.io/guides/editor_features/package_management.html) opens the notebook in an isolated virtual environment,
+> automatically installing the notebook's dependencies 📦
+
+You can also open notebooks without `uv`, with just `marimo edit <notebook.py>`;
+however, you'll need to install the requirements yourself.
diff --git a/examples/sql/README.md b/examples/sql/README.md
new file mode 100644
index 0000000000..a6736fa413
--- /dev/null
+++ b/examples/sql/README.md
@@ -0,0 +1,25 @@
+# SQL 🛢️
+
+These examples show how to use marimo's built-in support for SQL, which
+is powered by [duckdb](https://duckdb.org).
+
+> [!TIP]
+> Submit a
+> [pull request](https://github.com/marimo-team/marimo/pulls) to add an example!
+
+
+## Running examples
+
+The requirements of each notebook are serialized in them as a top-level
+comment. Here are the steps to open an example notebook:
+
+1. [Install marimo](https://docs.marimo.io/getting_started/index.html#installation)
+2. [Install `uv`](https://github.com/astral-sh/uv/?tab=readme-ov-file#installation)
+3. Open an example with `marimo edit --sandbox <notebook.py>`.
+
+> [!TIP]
+> The [`--sandbox` flag](https://docs.marimo.io/guides/editor_features/package_management.html) opens the notebook in an isolated virtual environment,
+> automatically installing the notebook's dependencies 📦
+
+You can also open notebooks without `uv`, with just `marimo edit <notebook.py>`;
+however, you'll need to install the requirements yourself.
diff --git a/examples/third_party/README.md b/examples/third_party/README.md
new file mode 100644
index 0000000000..88546c2950
--- /dev/null
+++ b/examples/third_party/README.md
@@ -0,0 +1,23 @@
+# Third-party 📦
+
+These examples showcase how to use various third-party packages in marimo.
+
+> [!TIP]
+> Submit a
+> [pull request](https://github.com/marimo-team/marimo/pulls) to add an example!
+
+## Running examples
+
+The requirements of each notebook are serialized in them as a top-level
+comment. Here are the steps to open an example notebook:
+
+1. [Install marimo](https://docs.marimo.io/getting_started/index.html#installation)
+2. [Install `uv`](https://github.com/astral-sh/uv/?tab=readme-ov-file#installation)
+3. Open an example with `marimo edit --sandbox <notebook.py>`.
+
+> [!TIP]
+> The [`--sandbox` flag](https://docs.marimo.io/guides/editor_features/package_management.html) opens the notebook in an isolated virtual environment,
+> automatically installing the notebook's dependencies 📦
+
+You can also open notebooks without `uv`, with just `marimo edit <notebook.py>`;
+however, you'll need to install the requirements yourself.
diff --git a/examples/ui/README.md b/examples/ui/README.md
new file mode 100644
index 0000000000..ee55784528
--- /dev/null
+++ b/examples/ui/README.md
@@ -0,0 +1,23 @@
+# UI 🖱️
+
+These examples showcase how to use marimo's built-in UI elements.
+
+> [!TIP]
+> New to marimo? Run `marimo tutorial intro` and `marimo tutorial ui`
+> at the command line first!
+
+## Running examples
+
+The requirements of each notebook are serialized in them as a top-level
+comment. Here are the steps to open an example notebook:
+
+1. [Install marimo](https://docs.marimo.io/getting_started/index.html#installation)
+2. [Install `uv`](https://github.com/astral-sh/uv/?tab=readme-ov-file#installation)
+3. Open an example with `marimo edit --sandbox <notebook.py>`.
+
+> [!TIP]
+> The [`--sandbox` flag](https://docs.marimo.io/guides/editor_features/package_management.html) opens the notebook in an isolated virtual environment,
+> automatically installing the notebook's dependencies 📦
+
+You can also open notebooks without `uv`, with just `marimo edit <notebook.py>`;
+however, you'll need to install the requirements yourself.