@galaxyproject/jupyterlite

中文文档
0.0.32发布于 2026/09/24ES Module零依赖近 30 天下载 1.2万

这个项目将 JupyterLite 与 Pyodide 内核和自定义扩展集成在一起, 例如 jl-galaxy。 。 。 .

中文使用文档
文档目录16 节
  1. 所需经费
  2. QQ 设置指令
  3. 1. 创建和激活虚拟环境
  4. 2. 安装 Python 依赖性
  5. 3. 安装节点js依赖性
  6. QQ 构建
  7. 服务
  8. 银河一体化公用事业 gxy (中文(简体) )
  9. ✅ api(endpoint, method="GET", data=None)
  10. ✅ get(datasets_identifiers, identifier_type="hid", retrieve…
  11. ✅ put(name, output=None, ext="auto", dbkey="?", history_id=…
  12. ✅ get_history(history_id=None)
  13. ✅ get_history_id()
  14. ✅ get_environment()
  15. ✅ _find_matching_ids(history_datasets, list_of_regex_patter…
  16. 页:1

JupyterLite + 银河一体化

这个项目将 JupyterLite 与 Pyodide 内核和自定义扩展集成在一起, 例如 jl-galaxy。 。 。 .

这个 jl-galaxy 扩展让Jupyter用户能够通过一个完全集成的基于浏览器的界面,与他们的Galaxy历史无缝地互动——包括加载和保存笔记本.

所需经费

  • 蟒 3.10.17+ (中文(简体) )
  • 节点.js 20.19.1+ (中文(简体) )
  • 无 10.8.2+ (单位:千美元)

QQ 设置指令

1. 创建和激活虚拟环境

python -m venv .venv
source .venv/bin/activate

2. 安装 Python 依赖性

pip install -r requirements.txt

此安装 jupyterlite, (中文(简体) ), jupyterlite-pyodide-kernel,则 gxy 银河系统一体化实用模块.

3. 安装节点js依赖性

npm install

安装 JavaScript 依赖性 package.json,包括自定义的JupyterLite扩展.


QQ 构建

运行完整的构建以生成独立的 JupyterLite 分布 :

npm run build

这将:

  • 运行 jupyter lite build
  • 包含 Pyodide 内核
  • 捆绑式联邦扩展像 jl-galaxy
  • 输出最后的静态站点到 : ./static/dist/_output

服务

在当地服务JupyterLite网站:

npm run serve

然后打开 http://localhost:3:00 (英语) 在您的浏览器中.


银河一体化公用事业gxy(中文(简体) )

这个 gxy 模块提供Python函数,直接从JupyterLite与Galaxy API交互.

✅ api(endpoint, method="GET", data=None)

向 Galaxy API 端点提交 HTTP 请求并返回解析后的 JSON 响应 .

await api("/api/histories")
await api("/api/histories", method="POST", data={"name": "New History"})

✅ get(datasets_identifiers, identifier_type="hid", retrieve_datatype=False)

通过HID,ID,或regex模式来下载数据集. 将其保存到Pyodide的虚拟文件系统.

await get(3)                          # by HID
await get("some_id", "id")
await get("myfile.*", "regex")
await get("mytag", "tag")

✅ put(name, output=None, ext="auto", dbkey="?", history_id=None)

将一个文件从虚拟文件系统上传到当前的Galaxy历史.

await put("mydata.txt", "newname.txt", ext="txt")

✅ get_history(history_id=None)

返回当前历史中所有可见数据集的元数据.

await get_history()

✅ get_history_id()

根据数据集上下文返回当前历史 ID.

await get_history_id()

✅ get_environment()

通过 __gxy__。 。 。 .

get_environment()

✅ _find_matching_ids(history_datasets, list_of_regex_patterns, identifier_type='hid')

内部用于解析regex模式到数据集标识符.


页:1

  • 这个 jl-galaxy 扩展允许用户直接从Jupyter UI浏览和管理Galaxy历史.
  • 所有文件必须放在里面 static/dist/_output; 在此目录外写入会打破构建.
  • 上传助手使用 XMLHttpRequest 绕着Pyodide的局限性工作 fetch。 。 。 .

版本与发布记录

@galaxyproject/jupyterlite 共发布 32 个版本,首次发布于 2025/05/07;过去 12 个月发布了 15 个版本。

版本发布日期距今
0.0.32latest2026/09/241 个月前
0.0.312026/09/082 个月前
0.0.302026/01/159 个月前
0.0.292026/01/1510 个月前
0.0.282026/01/0510 个月前
0.0.272025/12/2610 个月前

关于 @galaxyproject/jupyterlite 的常见问题

@galaxyproject/jupyterlite 是什么?

这个项目将 JupyterLite 与 Pyodide 内核和自定义扩展集成在一起, 例如 jl-galaxy。 。 。 .

如何安装 @galaxyproject/jupyterlite?

在项目目录运行 npm install @galaxyproject/jupyterlite,或使用 pnpm add / yarn add / bun add。

@galaxyproject/jupyterlite 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/galaxyproject__jupyterlite 是否存在。

@galaxyproject/jupyterlite 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@galaxyproject/jupyterlite 可以商用吗?

@galaxyproject/jupyterlite 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@galaxyproject/jupyterlite 的下载量有多少?

根据 npm 官方下载统计,@galaxyproject/jupyterlite 在 2026/10/16 – 2026/11/14 这 30 天内被下载 11,949 次,日均约 398 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@galaxyproject/jupyterlite 还在维护吗?

最新版本 0.0.32 发布于 2026/09/24(1 个月前);至今共发布 32 个版本,其中过去 12 个月发布了 15 个;首次发布于 2025/05/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。