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.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
docs: editable install for sandbox mode (#3786)
Myles Scolnick3c032cdd7b87
diff --git a/docs/guides/package_reproducibility.md b/docs/guides/package_reproducibility.mdindex 9e8775f987..16d5095cd7 100644--- a/docs/guides/package_reproducibility.md+++ b/docs/guides/package_reproducibility.md@@ -14,14 +14,12 @@ To opt-in to package reproducibility, use the `sandbox` flag:marimo edit --sandbox notebook.py```-=== "run"```bashmarimo run --sandbox notebook.py```-=== "new"```bash@@ -39,7 +37,6 @@ marimo's sandbox provides two key benefits. (1) Notebooks that carry their owndependencies are easy to share — just send the `.py` file. (2) Isolating anotebook from other installed packages prevents obscure bugs.-!!! note "Requires uv"Sandboxed notebooks require the uv package manager@@ -57,7 +54,6 @@ notebook from other installed packages prevents obscure bugs.crisis](https://leomurta.github.io/papers/pimentel2019a.pdf) due to the lackof package management.-## Inline script metadata { #auto-tracking-inline-script-metadata }When running with `--sandbox`, marimo automatically tracks package metadata in@@ -84,6 +80,7 @@ notebook's dependencies and Python version, and looks something like this:for an example of the full script metadata.### Adding and removing packages+When you import a module, if marimo detects that it is a third-partypackage, it will automatically be added to the script metadata. Removingan import does _not_ remove it from the script metadata (since library@@ -104,6 +101,24 @@ packagingdocumentation](https://packaging.python.org/en/latest/specifications/dependency-specifiers/#examples)for more information.+### Local development with editable installs++When developing a local package, you can install it in editable mode using the `[tool.uv.sources]` section in the script metadata. For example:++```python+# /// script+# requires-python = ">=3.11"+# dependencies = [+# "my-package",+# ]+#+# [tool.uv.sources]+# my-package = { path = "../", editable = true }+# ///+```++This is particularly useful when you want to test changes to your package without reinstalling it. The package will be installed in "editable" mode, meaning changes to the source code will be reflected immediately in your notebook.+## ConfigurationRunning marimo in a sandbox environment uses `uv` to create an isolated virtual