Skip to main content

jupyterlab-topbar-stop-server

Stop Server button for JupyterLab, similar to the Log Out button.

Adds a "Stop Server" button to the top bar that triggers JupyterLab's own filemenu:shutdown command (the same one used by File > Shut Down), which shows a confirmation dialog, shuts down running sessions/terminals, and calls the server's api/shutdown endpoint. Once that completes it navigates to the JupyterHub Control Panel's logout endpoint (hub_prefix + logout) directly, rather than this server's own /logout route, since that route only works while the single-user server is still alive to answer it -- which, right after shutdown, it may no longer be.

Installation

JupyterLab 4.x

pip install jupyterlab-topbar-stop-server

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-topbar-stop-server 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-topbar-stop-server

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyterlab_topbar_stop_server-0.1.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

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

jupyterlab_topbar_stop_server-0.1.0-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for jupyterlab_topbar_stop_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8eeec572c2becf5d2efffeced18274fdb8364329884fb1745504210adc0aea91
MD5 43ad09c4d1001f7d71a60709bcfad112
BLAKE2b-256 cc8cdd47dc057272fb265f3489369b2518a79fbcb4518bc9f11e843b72a1cd47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jupyterlab_topbar_stop_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d0313ef8f842c0d3e354ef5557aedb3f5df5a2d1c7312edd9db71ddcac7be8e
MD5 4cfd2953c77432e31beae8b21596299b
BLAKE2b-256 d19e1b4bb1ce15a38090d3a0b60abecb171fb42bd64359d6a3f62329cabba19d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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