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:
- Install Mercury framework.
- Add code cell with
Appobject and set
- 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:
pip install mercury
App object with
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)
static_notebook=True - it will do the magic!
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.
- You can share as many notebooks as you want in Mercury (see docs).
- You can easily customize welcome message in the home view.
- If you want to show notebook code, please add