A Jupyter extension that runs notebooks as web apps by hiding code cells and auto-executing them on open.
mljar/mercury
Turns a Jupyter notebook into an interactive, shareable web app with widgets and reactive re-execution, without writing a frontend.
Open-source alternative to:Streamlit
- Stars
- 4,358
- Forks
- 292
- Open issues
- 4
- Last commit
- 13 days ago
What is it?
Mercury is a Python framework for building interactive web apps directly from notebooks. Widgets such as text inputs and selectors feed values into the notebook, and changing a widget re-executes the cells below it, so there are no callback functions to write. The layout is predefined, so the resulting app looks consistent without any UI code.
The project includes a set of widgets, a standalone server started with the `mercury` command that serves every notebook in a directory as a web app, and a JupyterLab extension that previews the app during development. Apps can be protected with a password, customized through a config.toml file, and run with a shared session or independent sessions per viewer. It also supports chat interfaces and AI agent UIs, and can be deployed in a Docker container.
The live preview extension works in JupyterLab and MLJAR Studio, but not in Google Colab or VS Code.
Key features
- 01Interactive widgets whose changes re-execute the notebook cells.
- 02Standalone server that serves all notebooks in a directory as web apps.
- 03JupyterLab extension for live app preview during development.
- 04Predefined layout, so apps look consistent without frontend code.
- 05Password protection and optional shared sessions across viewers.
- 06Customizable title, footer, and notebook thumbnails via config.toml.
Use cases
- Turning an existing analysis notebook into a dashboard for non-technical colleagues.
- Building a chat or AI agent interface on top of notebook code.
- Publishing data reports that readers can adjust with input controls.
- Sharing teaching notebooks with students as runnable apps.
Quick start
- 1
Install Mercury from PyPI
pip install mercury - 2
Start the server in the directory with your notebooks
mercury
Things to know
- The live app preview works only in JupyterLab and MLJAR Studio, not in Google Colab or VS Code.
- User-based authentication is a paid option; the free option is a shared password.
In collections
Topics
FAQ
- What is mercury?
- Turns a Jupyter notebook into an interactive, shareable web app with widgets and reactive re-execution, without writing a frontend. Mercury is a Python framework for building interactive web apps directly from notebooks. Widgets such as text inputs and selectors feed values into the notebook, and changing a widget re-executes the cells below it, so there are no callback functions to write. The layout is predefined, so the resulting app looks consistent without any UI code.
- Is mercury free to use? What license does it have?
- mercury is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is mercury still maintained?
- Actively maintained. The last commit to mercury was on Oct 26, 2026.
- What can I use mercury for?
- Turning an existing analysis notebook into a dashboard for non-technical colleagues. Building a chat or AI agent interface on top of notebook code. Publishing data reports that readers can adjust with input controls. Sharing teaching notebooks with students as runnable apps.
- How do I install mercury?
- Install Mercury from PyPI: pip install mercury Start the server in the directory with your notebooks: mercury
- Where can I get mercury?
- The source code and installation instructions are on GitHub: https://github.com/mljar/mercury
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Python library that turns scripts into interactive web apps for data dashboards, reports and chat apps.
Turns Jupyter notebooks into standalone web applications, with each user getting their own kernel for interactive widgets.
A software stack for building realtime, browser-based apps and dashboards in Python or R without writing HTML, JavaScript, or CSS.
A reactive Python notebook that auto-reruns dependent cells, stores notebooks as plain .py files, and can run as scripts or deployed apps.
A JupyterLab extension that adds multiple file browsers connected to local and remote storage such as S3 and Samba shares.