Build and publish python packages from marimo notebooks
Project description
m_dev
A literate programming build system that converts Marimo notebooks into distributable Python packages.
What it does
Write code in numbered notebook files in a notebooks/ directory. Mark functions and classes for export by making them purely functional with references from the setup cell—Marimo detects these automatically. Run md build to generate a proper Python package with __init__.py, module files, and llms.txt API documentation.
Project structure
my-project/
├── pyproject.toml
├── notebooks/
│ ├── 00_core.py
│ ├── 01_read.py
│ ├── 02_pkg.py
│ ├── 03_docs.py
│ └── 04_build.py
└── src/
└── my_package/
├── __init__.py
├── core.py
├── read.py
└── ...
How it works
The build system parses notebooks via AST, extracts decorated exports (@app.function, @app.class_definition), and writes clean module files. It reads metadata from pyproject.toml and generates __init__.py with proper imports and __all__ exports.
The llms.txt file contains function signatures with inline documentation extracted from comments, formatted for LLM consumption. This provides a compact API reference.
CLI usage
md build # build package from notebooks/
md publish # publish to PyPI
md publish --test # publish to Test PyPI
Requirements
- Python 3.10+
- Marimo for notebook management
- uv for dependency management
- pyproject.toml with project metadata
Marimo manages your pyproject.toml through its package tab, making dependencies visible and easy to update.
Install
uv add m-dev --index testpypi=https://test.pypi.org/simple --index pypi=https://pypi.org/simple --index-strategy unsafe-best-match
Module structure
core.py- Data model:Kind,Param,Noderead.py- Parse notebooks, extract exports, scan projectpkg.py- Write module files and__init__.pydocs.py- Generate signatures andllms.txtbuild.py- Orchestrate the buildcli.py- Command-line interface
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file marimo_dev-0.1.0.tar.gz.
File metadata
- Download URL: marimo_dev-0.1.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux ARM","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5d221ea0bf72095af955a1b55d66d70436eb3e1967bde21453c69e61ebaeb8b
|
|
| MD5 |
223b8ef48c78c597ff28077406c1ef19
|
|
| BLAKE2b-256 |
9f91337cbf6d8f34509208a48322c7f41164aa6c0a72b81433359bcf36820aeb
|
File details
Details for the file marimo_dev-0.1.0-py3-none-any.whl.
File metadata
- Download URL: marimo_dev-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux ARM","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee29cfa0f35998e8c5a8d2e9aa4ec1a949b2b3c8f402318243a0f4f16dd36955
|
|
| MD5 |
84e48950c2531f47f92e86c74e1b6380
|
|
| BLAKE2b-256 |
215a55483b361f1c794df7571c9c359d0a7c9fcd1eadd308c3d09fa2afeb16af
|