JupyterLab extension to save the active notebook as a sibling Python script.
Project description
jupyterlab-save-py
jupyterlab-save-py is a JupyterLab 4 prebuilt frontend extension that adds a
notebook toolbar button and command palette item named Save .py.
The command converts the active .ipynb notebook to a sibling .py file on the
same Jupyter server using JupyterLab's built-in contents API. It does not run a
separate service and does not install a Jupyter Server extension.
Features
- JupyterLab 4.x prebuilt frontend extension
- Toolbar button labeled Save .py for notebooks
- Command palette command labeled Save .py
- Saves next to the active notebook with the same basename and
.pyextension - Uses the JupyterLab contents manager, not browser downloads
- Configurable output format:
percent:# %%cell markersscript: plain Python with cell comments
- Configurable overwrite behavior
Install
From PyPI:
pip install jupyterlab-save-py
From this repository:
uv sync
uv pip install -e .
Then start JupyterLab:
jupyter lab
Settings
Open JupyterLab's settings editor and search for Save .py.
Default settings:
{
"format": "percent",
"overwrite": true
}
When overwrite is false, existing files are not replaced. The extension will
save to name-1.py, name-2.py, and so on.
Development
Install dependencies into .venv with uv:
uv sync
uv run jlpm install
uv run jlpm build
uv pip install -e .
Run JupyterLab:
uv run jupyter lab
Watch TypeScript and labextension builds during development:
uv run jlpm watch
Build
Build frontend assets and Python distributions:
uv run jlpm install
uv run jlpm build:prod
uv run python -m build
The distributions are written to dist/.
Publish
This repository is configured for PyPI Trusted Publishing from GitHub Releases. Configure the PyPI project with:
- Owner:
MihneaTeodorStoica - Repository:
jupyterlab-save-py - Workflow:
publish.yml - Environment:
pypi
Manual upload is also possible:
uv run python -m twine upload dist/*
See CONTRIBUTING.md for the release checklist.
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jupyterlab_save_py-0.1.3.tar.gz.
File metadata
- Download URL: jupyterlab_save_py-0.1.3.tar.gz
- Upload date:
- Size: 251.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eae703c31ffbe9a49ad7f21a2f79ed1fc6771365b0d5ff2e203df09be3b45d3
|
|
| MD5 |
09a60bd39e5222f0e774ef4b52746e44
|
|
| BLAKE2b-256 |
023ca6403dcdc7d661191ef96300406adf4442fd8e4ef0b23e6816a06b286a2b
|
Provenance
The following attestation bundles were made for jupyterlab_save_py-0.1.3.tar.gz:
Publisher:
publish.yml on MihneaTeodorStoica/jupyterlab-save-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jupyterlab_save_py-0.1.3.tar.gz -
Subject digest:
5eae703c31ffbe9a49ad7f21a2f79ed1fc6771365b0d5ff2e203df09be3b45d3 - Sigstore transparency entry: 1316918181
- Sigstore integration time:
-
Permalink:
MihneaTeodorStoica/jupyterlab-save-py@6af7beaf8d68a8ff488899cbf8c80fd5dc771328 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MihneaTeodorStoica
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6af7beaf8d68a8ff488899cbf8c80fd5dc771328 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file jupyterlab_save_py-0.1.3-py3-none-any.whl.
File metadata
- Download URL: jupyterlab_save_py-0.1.3-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1db230bb35300fcec65d0b272b715b78c37a9d16107f0dca7d99a4eeaf29d56b
|
|
| MD5 |
23d72bc0484c9950069518481ae69f73
|
|
| BLAKE2b-256 |
c6bcb00e798249a77b50c0fbe84284df14e2b2e963aa1e0200ee7be1d4c6cb7a
|
Provenance
The following attestation bundles were made for jupyterlab_save_py-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on MihneaTeodorStoica/jupyterlab-save-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jupyterlab_save_py-0.1.3-py3-none-any.whl -
Subject digest:
1db230bb35300fcec65d0b272b715b78c37a9d16107f0dca7d99a4eeaf29d56b - Sigstore transparency entry: 1316918199
- Sigstore integration time:
-
Permalink:
MihneaTeodorStoica/jupyterlab-save-py@6af7beaf8d68a8ff488899cbf8c80fd5dc771328 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MihneaTeodorStoica
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6af7beaf8d68a8ff488899cbf8c80fd5dc771328 -
Trigger Event:
workflow_dispatch
-
Statement type: