@deshaw/jupyterlab_pyflyby
A labextension to integrate pyflyby with notebooks
Pyflyby helps you get rid of the tedious task of recalling and adding import statements. This labextension takes it further by adding the import statements automatically in your notebook. For eg. executing np.arange(10)
You can decide cell where imports should be added by adding 'pyflyby-cell' cell tag to it.
Requirements
- JupyterLab >= 4.0
Install
pip install jupyterlab_pyflyby
Contributing
Development install
Note: You will need NodeJS to build the extension package.
The jlpm command is the pinned version of yarn that is
installed with jupyter-builder.
You may use yarn or npm in lieu of jlpm below.
# Clone the repo to your local environment
# Change directory to the jupyterlab_pyflyby directory
# Install package in development mode, along with the development dependencies
pip install -e ".[dev]"
# Link your development version of the extension with JupyterLab
jupyter-builder 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
Endpoint authentication
Every verb method of every handler in jupyterlab_pyflyby/handlers.py must carry a
@tornado.web.authenticated decorator, or, if an endpoint is deliberately public, an
explicit @allow_unauthenticated/@ws_authenticated decorator from
jupyter_server.auth.decorator. The build workflow enforces this by running:
python .github/scripts/check_auth.py
Publishing
- Install dependencies:
pip install twine hatch - Update the version in
package.jsonand update the release date inCHANGELOG.md - Commit the change in step 1
- For test release, manually trigger the
Build and publish to PyPIworkflow - you need to check theTest releasecheckbox - Draft a new GitHub release, creating an approriate version tag
- Publish the draft and verify that the
publishjob in the build workflow passed.
Uninstall
pip uninstall jupyterlab_pyflyby
History
This plugin was contributed back to the community by the D. E. Shaw group.
License
This project is released under a BSD-3-Clause license.
We love contributions! Before you can contribute, please sign and submit this Contributor License Agreement (CLA). This CLA is in place to protect all users of this project.
"Jupyter" is a trademark of the LF Charities, of which Project Jupyter is a part.
Metadata
Release files for jupyterlab-pyflyby 5.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 | |
|---|---|---|---|
| jupyterlab_pyflyby-5.3.0.tar.gz | 116.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jupyterlab_pyflyby-5.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 145.9 kB
Release files / jupyterlab_pyflyby-5.3.0.tar.gz
| Download URL | jupyterlab_pyflyby-5.3.0.tar.gz |
|---|---|
| Size | 116.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
664ddffddec9c77449bda2e0531fb643cd5c030b09dc46ceaf32064dd18bd519
|
|
BLAKE2b-256 checksum How to use checksums |
0b0bbd668c289b5c234f8f35ac1a2e2d7ed671da4addf9ee450e58831e97bd16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 4, 2026.
Transparency logRelease files / jupyterlab_pyflyby-5.3.0-py3-none-any.whl
| Download URL | jupyterlab_pyflyby-5.3.0-py3-none-any.whl |
|---|---|
| Size | 29.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ad575c36fb4930f975fe89280fa2e8737fe253d12b29b11cda1ba0fa5f4dff8
|
|
BLAKE2b-256 checksum How to use checksums |
85506e7dbfc68499ea4dd4070fe2548d5ef96a40b3fc7fabf6c41d97d13a6d23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 4, 2026.
Transparency log