这是一个Jupyter服务器扩展,用于运行额外的进程并将它们代理到其中,它包含JupyterLab扩展以启动预定义的进程。
项目描述
Jupyter服务器代理
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,以避免冲突。
主要用例包括
- 与 JupyterHub / Binder 一起使用,允许启动用户进入与 Jupyter 无关的 Web 界面,例如 RStudio、Shiny 或 OpenRefine。
- 允许前端 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 启动面板中为注册的服务器进程提供启动按钮。
客户端兼容性
有关历史兼容性范围,请参阅下表
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的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | e5732eb9c810c0caa997f90a2f15f7d09af638e7eea9c67eb5c43e9c1f0e1157 |
|
MD5 | 780a77a0b66b59394bc576c9121444c4 |
|
BLAKE2b-256 | 2ac8ff6ecdbf55ac1a9253d53d87c60004ee508cfc852662b15fb33cd6ebfdbc |
jupyter_server_proxy-4.4.0-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 707b5c84810bb8863d50f6c6d50a386fec216149e11802b7d4c451b54a63a9a6 |
|
MD5 | ba650d8c4b92c84aea69c2741b389c08 |
|
BLAKE2b-256 | fdc6e4a1d9fdd22d40962befd82780a98b20b67ef9cafe87246e4955f44b8f09 |