Skip to main content

A JupyterLab extension, public by PiLab.

Project description

pi_service


调试

调试安装
# Clone the repo to your local environment
# Change directory to the pi_lab_jupyter_extension 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

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch

# Run JupyterLab in another terminal
jupyter lab --ip 0.0.0.0 --port 8888 --watch

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
卸载
# 卸载对应的python包
pip uninstall pi-lab-jupyter-extension

# 删除 通过`jupyter labextension develop .` 命令创建的软连接, 可以通过 `jupyter labextension list` 命令查看
jupyter labextension list
rm <labextension path>

发布 Pypi 包

This extension can be distributed as Python packages. All of the Python packaging instructions in the pyproject.toml file to wrap your extension in a Python package. Before generating a package, we first need to install build.

# 安装 编译`build`工具, pypi上传工具`twine`
python3 -m pip install build twine

# 编译
# To create a Python source package (`.tar.gz`) and the binary package (`.whl`) in the `dist/` directory, do:
python -m build --wheel

# 上传到 pypi
twine check dist/*

安装

pip install pi-lab-jupyter-extension

# 指定特定版本
pip install pi-lab-jupyter-extension==0.0.1

使用

import pi_lab_jupyter_pi_service
pi_lab_jupyter_pi_service.auth

卸载

pip uninstall pi-lab-jupyter-extension

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pi_lab_jupyter_extension-0.0.1-py3-none-any.whl (3.4 MB view details)

Uploaded Python 3

File details

Details for the file pi_lab_jupyter_extension-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pi_lab_jupyter_extension-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for pi_lab_jupyter_extension-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a262b2a62237c2cd4ea129e030941bf5c8f786c160cc4da5eaf75d9e5dce340
MD5 6c9d12a3bd634759b4f3eeb9bd835ca1
BLAKE2b-256 87edb3b520b918fdf16afc7eea4a6bf7416506bddd4b7c83bdb91a0dc5d24c54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page