A reactive notebook for Python — run reproducible experiments, execute as a script, deploy as an app, and version with git.
APACHE-2.0 License
Bot releases are hidden (Show)
Published by akshayka 6 months ago
Autoreload modules. marimo can now be configured to automatically reload modules before executing cells, bringing in any modifications you may have made to modules used by your notebook.
If you're coming from IPython/Jupyter, this is similar to the autoreload 2
magic.
Enable it in your settings:
https://github.com/marimo-team/marimo/assets/1994308/3b2aea42-4fdc-40cd-b9e7-11e6455465ba
Snippets. marimo now ships with a library of code snippets that you may find useful when working with data. Open the snippets panel via the toolbar at the bottom of a marimo notebook. We'll add more snippets over time; if there's a snippet you'd like to contribute, just click the +
button in the snippets panel to send it our way.
https://github.com/marimo-team/marimo/assets/1994308/63f607b3-ac0d-4f55-b4da-bad648810ab8
mo.audio
: you can now pass a path to a file to mo.audio
, and it'll do the right thing. This function now accepts arbitrarily large audio files.
PyArrow
tables: mo.ui.table()
now supports PyArrow
tables.
Full Changelog: https://github.com/marimo-team/marimo/compare/0.3.10...0.3.11
Published by akshayka 7 months ago
Quality-of-life improvements to mo.ui.file
, and misc. bug fixes.
Full Changelog: https://github.com/marimo-team/marimo/compare/0.3.9...0.3.10
Published by akshayka 7 months ago
Get started by updating your ~/.marimo.toml
config file:
[ai.open_ai]
# Get your API key from https://platform.openai.com/account/api-keys
api_key = "sk-..."
# Choose a model, we recommend "gpt-3.5-turbo"
model = "gpt-3.5-turbo"
# Change the base_url if you are using a different OpenAI-compatible API
base_url = "https://api.openai.com"
Read the docs to learn more.
Lazy evaluation/rendering of components The new library function mo.lazy()
lets you defer the computation and rendering of components, especially useful if you have expensive components that are hidden by default (e.g., in a tab or accordion).
__spec__
attr by @akshayka in https://github.com/marimo-team/marimo/pull/1058
Full Changelog: https://github.com/marimo-team/marimo/compare/0.3.8...0.3.9
Published by akshayka 7 months ago
Thanks @riyavsinha and @fuenfundachtzig for your contributions -- welcome to the marimo family!!
Highlights.
mo.query_params()
to access the URL query parameters; this makes it possible to parametrize notebooks when sharing.Cmd/Ctrl+p
-- no mouse clicks required -- and use Cmd/Ctrl+Shift+m
to toggle markdown view on and off.All changes.
Full Changelog: https://github.com/marimo-team/marimo/compare/0.3.7...0.3.8
Published by akshayka 7 months ago
Full Changelog: https://github.com/marimo-team/marimo/compare/0.3.6...0.3.7
Published by akshayka 7 months ago
Full Changelog: https://github.com/marimo-team/marimo/compare/0.3.5...0.3.6
Published by akshayka 7 months ago
This release includes contributions from several contributors -- thanks @wasimsandhu , @dmadisetti , and @deepyaman!
Highlights. This release includes a new public API for programmatically running multiple apps (in run
/read-only mode) -- this lets you create multi-page apps out of marimo notebooks, as well as seamlessly serve marimo apps as part of, eg, a larger FastAPI app.
Docs: https://docs.marimo.io/guides/deploying/programmatically.html
Example:
from typing import Annotated, Callable, Coroutine
from fastapi.responses import HTMLResponse, RedirectResponse
import marimo
from fastapi import FastAPI, Form, Request, Response
# Create a marimo asgi app
server = (
marimo.create_asgi_app()
.with_app(path="", root="./pages/index.py")
.with_app(path="/dashboard", root="./pages/dashboard.py")
.with_app(path="/sales", root="./pages/sales.py")
)
# Create a FastAPI app
app = FastAPI()
app.add_middleware(auth_middleware)
app.add_route("/login", my_login_route, methods=["POST"])
app.mount("/", server.build())
# Run the server
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
All changes.
Full Changelog: https://github.com/marimo-team/marimo/compare/0.3.4...0.3.5
Published by akshayka 7 months ago
Automatic package discovery and installation. marimo now automatically detects when you're missing packages in your Python environment, and gives you the option to install them using pip
, uv
, or rye
. When installation is successful, cells depending on the packages are automatically re-run!
marimo will alert you to missing packages:
and keeps you updated on installation progress:
This feature makes it really easy to get started with new notebooks and projects, especially when working in a fresh Python environment: just install packages as you go!
Visualize arrays and matrices with mo.image()
! mo.image()
can now visualize NumPy arrays, torch Tensors, and Scipy sparse matrices as images.
Full Changelog: https://github.com/marimo-team/marimo/compare/0.3.3...0.3.4
Published by akshayka 7 months ago
Improvements and bug fixes
Full Changelog: https://github.com/marimo-team/marimo/compare/0.3.2...0.3.3
Published by akshayka 7 months ago
Bug fixes and improvements.
IPython.display.display
to call mo.output.append
by @akshayka in https://github.com/marimo-team/marimo/pull/919
Full Changelog: https://github.com/marimo-team/marimo/compare/0.3.1...0.3.2
Published by akshayka 8 months ago
This release includes bug fixes.
Full Changelog: https://github.com/marimo-team/marimo/compare/0.3.0...0.3.1
Published by akshayka 8 months ago
The default host is now 127.0.0.1; previously, marimo listened on all interfaces by default. This is the only change that might be considered breaking in this release.
Highlights.
mo.carousel
, which lets you create a simple slide-like presentation of of a list of outputs; you can even view a carousel in full screen!AnyWidget
widgets and making them reactive — this also lets you write custom reactive plugins! https://docs.marimo.io/api/inputs/anywidget.html
All Changes.
Full Changelog: https://github.com/marimo-team/marimo/compare/0.2.13...0.3.0
Published by akshayka 8 months ago
Full Changelog: https://github.com/marimo-team/marimo/compare/0.2.12...0.2.13
Published by akshayka 8 months ago
Full Changelog: https://github.com/marimo-team/marimo/compare/0.2.11...0.2.12
Published by akshayka 8 months ago
Bug fixes and improvements.
Full Changelog: https://github.com/marimo-team/marimo/compare/0.2.10...0.2.11
Published by akshayka 8 months ago
Improvements and bug fixes.
Full Changelog: https://github.com/marimo-team/marimo/compare/0.2.9...0.2.10
Published by akshayka 8 months ago
New feature: Importable and runnable cells.
It's now possible to import cells defined in one notebook into other Python files and run them as functions.
This has two key benefits:
🧩 modularity: this lets you re-use notebook logic as you would regular Python code, wherever you like -- in other notebooks or Python files
🔬 testing: this makes it possible, and easy, to test notebook logic using tools like pytest
Check out the documentation for a full reference, or the below for an overview.
To use this feature, you first must name a cell -- either through the cell action menu, or by editing the name of the cell in the notebook file. For example, here we name a cell greetings
:
Then to use the named cell in another notebook, just import it and call its run
method:
# import a cell called greetings
from my_notebook import greetings
# output is the cell's last expression -- in this case, the markdown
# definitions is a mapping of the cell's definition names to their values
output, definitions = greetings.run()
You can also substitute values for the cell's references. For example, to greet someone else:
output, definitions = greetings.run(name="Alice")
This release also includes a number of bug fixes and improvements.
Full Changelog: https://github.com/marimo-team/marimo/compare/0.2.8...0.2.9
Published by akshayka 8 months ago
Full Changelog: https://github.com/marimo-team/marimo/compare/0.2.7...0.2.8
Published by akshayka 8 months ago
Highlights.
⏳ New Feature: top-level await!
In this release, it's now possible to use await
in marimo cells. This makes it easy to use async functions.
Additionally, in WASM-powered marimo notebooks, this lets you use micropip
to install packages: just use
import micropip
await micropip.install("package name")
Full Changelog: https://github.com/marimo-team/marimo/compare/0.2.6...0.2.7
Published by akshayka 8 months ago
This release contains bug fixes and improvements.
mo.state
by @akshayka in https://github.com/marimo-team/marimo/pull/809
Full Changelog: https://github.com/marimo-team/marimo/compare/0.2.5...0.2.6