Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Publish a Jupyter Notebook as a Medium blogpost

Project description

Jupyter to Medium

Publish Jupyter Notebooks as Medium blog posts directly from your notebook with the help of jupyter_to_medium.


pip install jupyter_to_medium

Then run the following command to enable the extension.

jupyter bundlerextension enable --py jupyter_to_medium._bundler --sys-prefix

Get an Integration Token from Medium

Before using this package, you must request an integration token from Medium. Read the instructions here on how to get your integration token.


There are three ways to publish notebooks:

  • Within an active notebok
  • Using a Python script
  • From the command line

Publishing to Medium within a Notebook

After enabling the extension, open the notebook you wish to publish and select the option File -> Deploy as -> Medium Post


A new browser tab will open with a short form that needs to be completed.


After clicking publish, the notebook and all images will be uploaded to Medium. Any HTML tables (such as pandas DataFrames) will be converted to images (via chrome) as Medium has no ability to represent tables. This is a time consuming process, so be prepared to wait. Check your terminal for updates on what is happening.

If successful, you'll get the following response with a link to view the post.


Click the link to view the post.


I suggest keeping the setting to publish as a draft, then review on Medium and finalize the publishing there.

Publishing to Medium with a Python Script

Pass the publish function the location of the Jupyter Notebook you would like to publish as a Medium blog post

>>> import jupyter_to_medium as jtm
>>> jtm.publish('My Awesome Jupyter Notebook.ipynb',

If successful, JSON data will be returned with the URL.

Publishing to Medium from the Command Line (upcoming)


  • Google Chrome / Brave browser

Project details

Download files

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

Files for jupyter-to-medium, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size jupyter_to_medium-0.0.4-py3-none-any.whl (14.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size jupyter_to_medium-0.0.4.tar.gz (12.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page