跳转到主要内容

这是一个Jupyter服务器扩展,用于运行额外的进程并将它们代理到其中,它包含JupyterLab扩展以启动预定义的进程。

项目描述

Jupyter服务器代理

ReadTheDocs badge GitHub Workflow Status PyPI badge Conda badge NPM badge

Jupyter 服务器代理允许您在笔记本服务器旁边运行任意外部进程(例如 RStudio、Shiny 服务器、Syncthing、PostgreSQL、Code 服务器等),并使用类似于 /rstudio 的路径提供对这些进程的认证网络访问,与其他路径如 /lab 一起。除了提供主要功能的 Python 包之外,JupyterLab 扩展(@jupyterhub/jupyter-server-proxy)还提供了按钮,例如在 JupyterLab 启动窗口中访问 RStudio。

注意:该项目之前被称为 nbserverproxy。由于 nbserverproxy 是 jupyter-server-proxy 的旧版本,因此在安装 jupyter-server-proxy 之前应先卸载 nbserverproxy,以避免冲突。

主要用例包括

  1. 与 JupyterHub / Binder 一起使用,允许启动用户进入与 Jupyter 无关的 Web 界面,例如 RStudio、Shiny 或 OpenRefine。
  2. 允许前端 JavaScript(在经典笔记本或 JupyterLab 扩展中)以安全方式访问本地运行的其他进程的 Web API。这被用于 JupyterLab 扩展,用于 dask

文档 包含有关安装和使用的详细信息。

安全警告

Jupyter 服务器代理通常用于启动用户定义的过程,该过程监听某些网络端口(例如 http://localhost:4567),用于启动 Jupyter 服务器,只有该用户才有权限访问。然后,用户可以通过 Jupyter 服务器代理访问启动的进程。

为了安全地使用 Jupyter 服务器代理,您应确保由 Jupyter 服务器代理启动的进程不能被其他用户直接访问并绕过 Jupyter 服务器的授权!

强制通过 Jupyter 服务器代理进行访问的常见策略是在容器内启动 Jupyter 服务器,并且仅允许通过容器访问 Jupyter 服务器。

有关更多信息,请参阅 Ryan Lovett 关于此的评论

安装

Python 包

pip

pip install jupyter-server-proxy

conda

conda install -c conda-forge jupyter-server-proxy

Jupyter 客户端扩展

Python 包捆绑了 JupyterLab 和笔记本扩展,以提供

  • 在笔记本树视图的 新建 下拉菜单中的服务器
  • 在 JupyterLab 启动面板中为注册的服务器进程提供启动按钮。
    • a screenshot of the JupyterLab Launcher

客户端兼容性

有关历史兼容性范围,请参阅下表

jupyter-server-proxy 笔记本 jupyterlab
4.1.x >=6,<8 >=3,<5
4.0.x >=6,<7 >=3,<4
3.x >=6,<7 >=2,<4

禁用

服务器扩展

jupyter serverextension disable --sys-prefix jupyter_server_proxy
jupyter server extension disable --sys-prefix jupyter_server_proxy

经典笔记本扩展

jupyter nbextension disable --sys-prefix --py jupyter_server_proxy

JupyterLab 扩展

jupyter labextension disable @jupyterhub/jupyter-server-proxy

本地开发

要设置本地开发环境,请参阅 贡献指南

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分发

jupyter_server_proxy-4.4.0.tar.gz (136.8 kB 查看哈希值)

上传时间

构建分发

jupyter_server_proxy-4.4.0-py3-none-any.whl (37.6 kB 查看哈希值)

上传时间 Python 3

支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面