Transform your repository of notebooks into a collection of interactive data apps. In this blog, we’ll explore how to serve your collection of Pytho

Serve notebooks from GitHub on the fly with marimo

submited by
Style Pass
2024-12-09 23:00:14

Transform your repository of notebooks into a collection of interactive data apps. In this blog, we’ll explore how to serve your collection of Python notebooks as data apps directly from a GitHub repository using marimo. This is a great demonstration of a few of marimo’s unique features:

We’ll use marimo’s ASGI server to serve notebooks from a GitHub repository. The server reads notebooks and creates individual marimo apps for each one, all while keeping the code simple and maintainable.

We’re using PEP 723 to declare our dependencies inline, instead of a separate requirements.txt. Doing so allows us to run this script directly with uv without needing a separate requirements file. This is also what powers marimo’s sandboxed notebooks.

This function recursively retrieves all Python files from the specified GitHub repository. Since marimo notebooks are just Python files, we don’t need any special conversion or post-processing.

Leave a Comment