Skip to main content

Turn Jupyter Notebook to Web App and share with non-technical users

Project description

Mercury convert Jupyter Notebook to Web App

Tests PyPI version Anaconda-Server Badge

Build Web Apps in Jupyter Notebook

Mercury allows you to add interactive widgets in Python notebooks, so you can share notebooks as web applications. Forget about rewriting notebooks to web frameworks just to share your results. Mercury offers a set of widgets with simple re-execution of cells.

You can build with Mercury:

  • Turn your notebook into beautiful Web Apps,

  • Create interactive Presentations with widgets, you can recompute slides during the show,

  • Share notebooks as static Websites,

  • Build data-rich Dashboards with widgets,

  • Create Reports with PDF exports, automatic scheduling, and email notifications (coming soon),

  • Serve Python notebooks as REST API endpoints (coming soon).

Mercury features:

  • add widgets with Python code - no frontend experience needed!
  • hide or show notebook's code,
  • export executed notebook to PDF or HTML,
  • share muplitple notebooks - no limits!
  • embed notebook on any website,
  • easy file upload and download from the notebook,
  • add authentication to notebooks (coming soon),
  • schedule automatic notebook execution (coming soon).

Example

Simple code example that creates a widget and displays its value. You can interact with a widget in the Jupyter Notebook. Its value will be updated. However, to see the update in other cells you need to manually execute them.

Import package:

import mercury as mr

Create a Text widget:

name = mr.Text(value="Piotr", label="What is your name?")

Print widget value:

print(f"Hello {name.value}")

Code in Jupyter Notebook

Web App from Notebook

Mercury App

Use Mercury to run notebook as web application. Cells are automatically re-executed after widget change. Mercury re-executes only cells with widget definition and below it. In the example, cells 2 and 3 are re-executed after widget update.

Web App from Notebook

Documentation

📚 Read more about Mercury on RunMercury.com.

Installation

Compatible with Python 3.7 and higher.

Install with pip:

pip install mercury

Install with conda:

conda install -c conda-forge mercury

Demo

Run Mercury with demo notebooks.

mercury run demo

Please check 127.0.0.1:8000 to see demo notebooks.

Mercury with your notebooks

To run Mercury with your notebook, please execute the following:

mercury run

The command should be run in the same directory as notebooks. You can change code in Jupyter Notebook, and Mercury will instantly update web app.

Mercury License

Mercury is released with AGPL v3 license.

Looking for dedicated support, a commercial-friendly license, and more features? The Mercury Pro is for you. Please see the details at our website.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mercury-2.0.9.tar.gz (2.4 MB view details)

Uploaded Source

File details

Details for the file mercury-2.0.9.tar.gz.

File metadata

  • Download URL: mercury-2.0.9.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for mercury-2.0.9.tar.gz
Algorithm Hash digest
SHA256 57d455c1313f9fe04ca121578046b7fbb8b9521adbfffc694bd09e8d50bbd3b3
MD5 e591e6c55f939cb8d370c877bb5c99e6
BLAKE2b-256 99bd7097a3c88e57ab73574c9fcd7399a48f4f9f4b024306e0b7644e2a3911d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page