Skip to main content

A JupyterLab extension for managing multiple checkpoints

Project description

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

  1. Clone the repository
git clone https://github.com/yourusername/jupyter-checkpoints.git
cd jupyter-checkpoints
  1. Install the Python package
pip install -e .
  1. 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

  1. Open any file or notebook
  2. Click the "Restore Checkpoint" button (undo icon) in the toolbar
  3. Select the checkpoint to restore from the dropdown menu
  4. 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

  1. Clone the repository
git clone https://github.com/yourusername/jupyter-checkpoints.git
cd jupyter-checkpoints
  1. Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate  # Linux/Mac
# or
.venv\Scripts\activate  # Windows
  1. Install development dependencies
pip install -e .
  1. Install JavaScript dependencies and build
cd js
npm install
npm run build
  1. 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

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

jupyter_checkpoints-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

jupyter_checkpoints-0.1.0-py3-none-any.whl (76.1 kB view details)

Uploaded Python 3

File details

Details for the file jupyter_checkpoints-0.1.0.tar.gz.

File metadata

  • Download URL: jupyter_checkpoints-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for jupyter_checkpoints-0.1.0.tar.gz
Algorithm Hash digest
SHA256 29f658dfe597d7d60796a9e2cb6cae911df5e84e1a181c5adae01e632a045d47
MD5 46b37e8ee0a4c7104e8595ae01f300f5
BLAKE2b-256 16c53bf565034cdc1d0812a8b6c51ba4a5dc8fa8140bd7d49222f3dc0989babb

See more details on using hashes here.

File details

Details for the file jupyter_checkpoints-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyter_checkpoints-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74476ac85b9ecfd590e5867e6e2957001181451fcef3cd01a7b572970767faba
MD5 e2c4c40b940440b8744acce4b9a50a1f
BLAKE2b-256 2d5b11514359c5cb0b41dfd90deedc2b031c3c597d37f608e77c4b2ad513fd0f

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