smalldocs 0.4.0

Run Python notebooks in the browser

Author

Rahul Dave

Published

October 18, 2026

Python notebooks can now have Run in browser and Download and run buttons. JupyterLite supplies the editor, and Pyodide runs Python in the reader’s browser. The buttons and the loading page use the fonts and colours of your site’s theme.

Install smalldocs[notebooks] and set browser-notebooks: true to turn on the feature. The build reads the imports and checks each package against the disallow list of Pyodide. It writes the dependencies as metadata into a copy of the notebook. The source notebook stays unchanged, and the build runs no notebook code.

The documentation includes two examples:

The browser notebook guide covers setup, lint, data files and downloads. Sites that leave the feature off keep their existing output.