A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://runmercury.com/tutorials/website-python-jupyter-notebook/ below:

Website Navigation


Turn Jupyter Notebook into Website in 3 minutes

Turn Jupyter Notebook into Website in 3 minutes

Would you like to quickly turn your Python notebook into static website? It is very easy with Mercury framework.

You need to do simple 3 steps:

  1. Install Mercury framework.
  2. Add code cell with App object and set static_notebook=True in constructor.
  3. Run notebook in Mercury.
1. Install Mercury

You can read more here about different ways to install Mercury package.

The easiest way is to run:

2. Set App object with static_notebook=True

Please open the notebook that you would like to convert to a static website. You need to add following code in it:

import mercury as mr
 
# configure App properties
app = mr.App(title="Static notebook", description="Display static notebook", static_notebook=True)

Please set static_notebook=True - it will do the magic!

Example notebook 3. Run Mercury

The last step is to run Mercury Server. Please run the following command:

You should see in the web browser at address http://127.0.0.1:8000 a website like in the image below:

In the above screenshot only one notebook is served. Please click in the notebook title and you will see selected notebook website:

You can download notebook as PDF or HTML format.

Additional notes

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4