Notebook-Native Web Apps

Build a Web App in Python Straight from a Jupyter Notebook

No Flask. No React. No rewrite. Turn any Python notebook into a web app — chatbots, dashboards, or internal tools — with Mercury, the open-source framework by MLJAR.

4.3k GitHub starsOpen sourceApache-2.0
MLJAR Mercury showing a Python notebook transformed into an interactive web app

What is a Python web app?

A Python web app is any tool your code powers that other people can open in a browser — a dashboard, a chatbot, a form, or a report — without needing Python installed or knowing how to run a notebook.

Many Python web app frameworks ask you to write the app as a script or restructure the code around callbacks. Mercury works differently: write a normal Jupyter notebook, add a few widgets, and turn it into a web app without maintaining a separate frontend.

The smallest useful example

A web app in three notebook cells

Add one input to a normal notebook and use its value in the cells below. Mercury supplies the browser interface and reactive execution.

notebook.ipynb
[1]
import mercury as mr
[2]
name = mr.TextInput(
    label="What is your name?"
)
[3]
mr.Markdown(
    f"## Hello {name.value}! 👋"
)
localhost:8888/app/notebook

Hello Ada! 👋

Change the widget and Mercury automatically recomputes the cells below it.

That’s it. Your notebook is now a web app. Try the quickstart

A notebook-first workflow

From notebook to web app in four steps

  1. 01

    Write a normal notebook

    Use JupyterLab, MLJAR Studio, or your usual Jupyter environment. Just write Python.

  2. 02

    Add Mercury widgets

    Add a TextInput, Select, Chat, or another widget. There are no callbacks to wire up.

  3. 03

    Preview it live

    Open the live app preview in JupyterLab or MLJAR Studio and see changes as you work.

  4. 04

    Deploy it

    Self-host with Docker or publish with the managed MLJAR Cloud service.

Flexible deployment

Deploy your app, your way

Use the same Mercury notebooks with either deployment approach. Only the hosting changes.

Deployment Self-hosted MLJAR Cloud
SetupYour Docker host or serverManaged for you
CostFree, open-source softwareManaged cloud plans
ControlFull infrastructure and data controlMLJAR handles infrastructure
Best forPrivate, internal, or custom deploymentsThe fastest path to a shareable link

Password protection is available in Mercury. User-based authentication is a paid option — contact MLJAR for details.

Simple by design

Why build with Mercury

No frontend code

Mercury handles layout, navigation, and styling automatically.

No callbacks

Changing a widget automatically recomputes the notebook cells below it.

Live preview

Preview the app inside JupyterLab or MLJAR Studio before deploying it.

Clean layout by default

Get a responsive interface without designing a separate frontend.

Runs from a notebook

Keep the analysis and application together in one familiar Python workflow.

Open source

Mercury is Apache-2.0 licensed and free to self-host.

Framework choices

Coming from another framework?

Here is the short version of how Mercury’s notebook-native workflow differs.

FrameworkThe one-line difference
StreamlitStreamlit reruns the app script after an interaction. Mercury works from a notebook and recomputes cells below the changed widget.
GradioGradio is focused on quickly wrapping models and functions. Mercury supports full notebook apps, dashboards, and chat interfaces.
DashDash uses a callback-driven application structure. Mercury keeps the workflow in a notebook without callback wiring or HTML layout code.

See it in action

From notebook to app

Browse real Mercury apps, including chatbots, dashboards, data utilities, and custom interface examples.

MLJAR Mercury showing a Python notebook transformed into an interactive web app

FAQ

Common questions

What is a Python web app framework?+

A Python web app framework lets you build a browser-based interface — including forms, charts, dashboards, and tools — using Python. Mercury is built specifically to turn Jupyter notebooks into apps without rewriting them as a separate frontend application.

Do I need HTML, CSS, or JavaScript to build a web app in Python?+

No. Mercury generates the layout, navigation, and styling from your notebook and widgets, so you can build the application interface using Python.

Can I deploy a Mercury app for free?+

Yes. Mercury is open source under the Apache-2.0 license, and you can self-host it with Docker on your own infrastructure. MLJAR Cloud is the managed option for teams that want hosting handled for them.

What is the difference between self-hosting and MLJAR Cloud?+

Self-hosting with Docker gives you control over the infrastructure and data. MLJAR Cloud manages the application infrastructure so you can publish without configuring your own server.

Does Mercury work with JupyterLab, or only MLJAR Studio?+

It works with both. Mercury provides live app preview in JupyterLab through its extension and in MLJAR Studio. The live preview is not currently available in Google Colab or VS Code.

Is Mercury open source?+

Yes. Mercury is licensed under Apache-2.0 and developed openly on GitHub, where contributions are welcome.

Start building

$ pip install mercury

Python and a notebook are all you need to begin.