Skip to main content

j-to-py

j-to-py converts Jupyter Notebook files (.ipynb) into Python scripts (.py) while preserving IPython shell commands (!) and magics (%, %%).

Installation

pip install j-to-py

To run generated scripts containing IPython syntax:

pip install python

Command-line usage

j-to-py notebook.ipynb
j-to-py notebook.ipynb -o scripts/notebook.py
j-to-py --help

You can also run it as a module:

python -m j_to_py notebook.ipynb

Python API

from j_to_py import convert_notebook

convert_notebook("notebook.ipynb")
convert_notebook("notebook.ipynb", "scripts/notebook.py")

Running converted notebooks

If the notebook uses ! shell commands or %/%% magics, run the generated script with IPython:

ipython notebook.py

License

MIT License. See LICENSE.

Metadata

Release files for j-to-py 0.1.0

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

Source distribution (sdist)

Source distribution for j-to-py 0.1.0
File Size Uploaded Provenance Actions
j_to_py-0.1.0.tar.gz 3.9 kB Without provenance Details for j_to_py-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for j-to-py 0.1.0
File Interpreter ABI Platform Actions
j_to_py-0.1.0-py3-none-any.whl Python 3 none any Details for j_to_py-0.1.0-py3-none-any.whl

Total release size: 8.4 kB

Release files / j_to_py-0.1.0.tar.gz

Download URL j_to_py-0.1.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8b02d4df8da311044c08856ceb3cd0a57dba2bd70d74994dccbd591533733773
BLAKE2b-256 checksum
How to use checksums
a68ced0d31ef04eed02f97029021d02ba172afd35fcfdedaf83358530b470ef9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Release files / j_to_py-0.1.0-py3-none-any.whl

Download URL j_to_py-0.1.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ec078e67fad363b160a0793b39066a778aed56383f09f84e180a3537cd8812f
BLAKE2b-256 checksum
How to use checksums
48914baeaee005058bfa6b6cf3985fb47443e51bce20dd75a200c9a2146338cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Security for j-to-py 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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