Skip to main content

Converts .ipynb files to .py files.

Project description

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)

Project details


Download files

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

Source Distribution

jnb2py-0.0.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jnb2py-0.0.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file jnb2py-0.0.2.tar.gz.

File metadata

  • Download URL: jnb2py-0.0.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for jnb2py-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0998d69c64e6f71a4fd7fd9068b46dd63266af2d2df58533ea3900e53f69e9e1
MD5 cb88350145fda85ecde3d727769e5362
BLAKE2b-256 0066e7e4194bb58fbc8870fcacd777246eebe2da7106280a6072a612a8b5cdcb

See more details on using hashes here.

File details

Details for the file jnb2py-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: jnb2py-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for jnb2py-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 50cc08396b7f636800cd0360c3b035fcba42855fcd1746186c97b928253a065a
MD5 ed7aa74718dddde7dd699b563a44ce2a
BLAKE2b-256 b5e39570eefc05d1c01b3cb66eb1631654d7cb6dcd0d2bcb7742f730d732fe9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page