Skip to main content

Jupyterlab Autosave on Focus Change

PyPi Version Supported Python Versions Github Actions Status Binder Docs

All Contributors

A Jupyterlab extension to autosave files on focus change.


Who doesn't know this scenario, you changed some code or input file and the changes don't apply because (again!) you forgot to save the file.

This is where editor settings to save files when the tab (or the whole editor) loose focus come in super handy.

This extension aims to do the same for jupyterlab as the following setting in VS-Code.

  "files.autoSave": "onFocusChange",

Features

  • Autosave on focus change
  • De-/Activation via Settings Menu
  • File exclusion with glob patterns

Requirements

  • JupyterLab >= 4.0

Install

pip install jupyterlab-autosave-on-focus-change

Contributing

Development install

Note: You will need NodeJS to build the extension package.

The jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of jlpm below.

# Clone the repo to your local environment
# Change directory to the jupyterlab_autosave_on_focus_change directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm run build

You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab

With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

By default, the jlpm run build command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:

jupyter lab build --minimize=False

Uninstall

pip uninstall jupyterlab-autosave-on-focus-change

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Sebastian Weigand
Sebastian Weigand

💻 🤔 🚧 📆 🚇 ⚠️ 📖
mengyanw
mengyanw

💻 🚧
Jakub Klinkovský
Jakub Klinkovský

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

Metadata

Release files for jupyterlab-autosave-on-focus-change 0.4.1

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

Source distribution (sdist)

Source distribution for jupyterlab-autosave-on-focus-change 0.4.1
File Size Uploaded
jupyterlab_autosave_on_focus_change-0.4.1.tar.gz 4.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyterlab-autosave-on-focus-change 0.4.1
File Interpreter ABI Platform
jupyterlab_autosave_on_focus_change-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.2 MB

Release files / jupyterlab_autosave_on_focus_change-0.4.1.tar.gz

Download URL jupyterlab_autosave_on_focus_change-0.4.1.tar.gz
Size 4.2 MB
Tags Source
SHA-256 checksum
How to use checksums
54bbec282cfe56f50566e7ed7caf51c98db7280695da97efc089b981622964c9
BLAKE2b-256 checksum
How to use checksums
d545bebcee2b144da3b5243a38cbf64f581ec7b855054375928947d943de6fb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2024.

Transparency log

Release files / jupyterlab_autosave_on_focus_change-0.4.1-py3-none-any.whl

Download URL jupyterlab_autosave_on_focus_change-0.4.1-py3-none-any.whl
Size 31.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
038aefc5d0793852b400f6d967362c379497fe8a40ef640ce3cf294ed9670cba
BLAKE2b-256 checksum
How to use checksums
f0ffb5e6973201724534e6976f8159a3c2437a928bc9c243be6b6e5a0035c0d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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