JupyterCheckpoints
A JupyterLab extension for managing multiple checkpoints, allowing users to save and restore multiple historical versions of files.
Features
- Maintains up to 5 checkpoints for each file (configurable)
- Restore to any checkpoint directly from the JupyterLab interface
- Supports notebooks (.ipynb) and regular text files
- Provides a user-friendly interface showing checkpoint creation time and relative time (e.g., "5 minutes ago")
- Automatically manages checkpoints, removing older versions
Installation
Using pip
pip install jupyter-checkpoints
From Source
- Clone the repository
git clone https://github.com/yourusername/jupyter-checkpoints.git
cd jupyter-checkpoints
- Install the Python package
pip install -e .
- Install the frontend extension
jupyter labextension develop --overwrite .
Usage
After installation, JupyterCheckpoints will be automatically activated. A "Restore Checkpoint" button will be added to the toolbar of each open notebook and file editor.
Restoring to a Checkpoint
- Open any file or notebook
- Click the "Restore Checkpoint" button (undo icon) in the toolbar
- Select the checkpoint to restore from the dropdown menu
- Confirm the restore operation
Configuration
You can set the maximum number of checkpoints to keep for each file in your Jupyter configuration file:
c.AsyncMultiCheckpoints.max_checkpoints = 10 # Default is 5
Development
Prerequisites
- JupyterLab >= 4.0.0
- Python >= 3.12
- Node.js
Setting Up Development Environment
- Clone the repository
git clone https://github.com/yourusername/jupyter-checkpoints.git
cd jupyter-checkpoints
- Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate # Linux/Mac
# or
.venv\Scripts\activate # Windows
- Install development dependencies
pip install -e .
- Install JavaScript dependencies and build
cd js
npm install
npm run build
- Install the extension in development mode
jupyter labextension develop --overwrite .
Development Workflow
- After modifying Python code, restart the Jupyter server
- After modifying JavaScript code:
cd js npm run build
Then refresh the JupyterLab page
License
MIT
Metadata
Release files for jupyter-checkpoints 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jupyter_checkpoints-0.3.0.tar.gz | 9.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jupyter_checkpoints-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.7 kB
Release files / jupyter_checkpoints-0.3.0.tar.gz
| Download URL | jupyter_checkpoints-0.3.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5cfe98e966c9884b585820eb6134a1cbeb0b80fc8f87750e72174ce2c04a8a43
|
|
BLAKE2b-256 checksum How to use checksums |
bca05d9eece47fd29b793640d9a1c70b2f889082e466e86feac3633b70e22e21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Release files / jupyter_checkpoints-0.3.0-py3-none-any.whl
| Download URL | jupyter_checkpoints-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
456bd1d3ee4536d980e875999a41a64c38b045d34a0ef3c59e61287684b5fd78
|
|
BLAKE2b-256 checksum How to use checksums |
1e5395601dacd951c031551b85626130e7a6ad0bb34e5d61053fced34308a344
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|