Jupyter to Medium
Publish Jupyter Notebooks as Medium blog posts directly from your notebook with the help of jupyter_to_medium.
Installation
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.
Usage
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',
integration_token=None,
pub_name=None,
dataframe_image=True,
title=None,
tags=None,
publish_status='draft',
notify_followers=False,
license='all-rights-reserved',
canonical_url=None)
If successful, JSON data will be returned with the URL.
Publishing to Medium from the Command Line (upcoming)
Dependencies
- Google Chrome / Brave browser
Metadata
Release files for jupyter-to-medium 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jupyter_to_medium-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for jupyter_to_medium-0.0.5-py3-none-any.whl |
Release files / jupyter_to_medium-0.0.5-py3-none-any.whl
| Download URL | jupyter_to_medium-0.0.5-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3a416c3de92f9a09e9a280599102177f1cc8ec7e110db62e5d2a4ec27a279ea
|
|
BLAKE2b-256 checksum How to use checksums |
b84c7cb3fff98d8da93469e47246a131511a8a57d9c7ec986bae5946c03752d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6
|
Security for jupyter-to-medium 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.