Skip to main content

jnb2py

jnb2py is a Python library for converting Notebooks(.ipynb) into Python (.py) files.

Quickstart

jnb2py requires an installation of Python 3.10 or greater, as well as pip.

Installation

jnb2py requires an installation of Python 3.10 or greater, as well as pip. (Pip is typically bundled with Python installations.)

To install from PyPI with pip:

pip install jnb2py

Using nb2py in a Python Script

To convert a notebook, you'll need to do this.

>>> from jnb2py import Converter
>>> file_path = "/path/to/the/notebook.ipynb"
>>> converter = Converter(file_path)
>>> output_file_name = "extract_code.py"
>>> output_path = "/path/to/the/output/destination"
>>> converter.convert_to_py(output_file_name, output_path)

Release files for jnb2py 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jnb2py 0.0.2
File Size Uploaded
jnb2py-0.0.2.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jnb2py 0.0.2
File Interpreter ABI Platform
jnb2py-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / jnb2py-0.0.2.tar.gz

Download URL jnb2py-0.0.2.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0998d69c64e6f71a4fd7fd9068b46dd63266af2d2df58533ea3900e53f69e9e1
BLAKE2b-256 checksum
How to use checksums
0066e7e4194bb58fbc8870fcacd777246eebe2da7106280a6072a612a8b5cdcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / jnb2py-0.0.2-py3-none-any.whl

Download URL jnb2py-0.0.2-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50cc08396b7f636800cd0360c3b035fcba42855fcd1746186c97b928253a065a
BLAKE2b-256 checksum
How to use checksums
b5e39570eefc05d1c01b3cb66eb1631654d7cb6dcd0d2bcb7742f730d732fe9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page