← 文章 / 开源项目
Simon Willison 1天前 · 2026-11-21 01:27:01 · 4 阅读

datasette-arrows 0.1a0 发布:基于 Arrow IPC 的流式导出插件

发布 datasette-arrows 0.1a0 — 使用 Arrow IPC 实现 Datasette 的流式导出。

Datasette 1.0a43 允许插件实现流式导出格式。Datasette 核心支持流式 CSV 和 TSV——你可以从表中导出数百万行数据而无需将其全部载入内存,因为这两种文件格式支持分块流式传输数据。现在可以利用 register_output_renderer() 插件钩子,为其他格式实现相同的模式。

我深知,发布新功能时,务必同时提供一个使用该功能的插件。

Claude Fable 5.2 建议使用 Apache Arrow 流式 格式,并几乎一次性完成了该插件的开发。

将该插件添加到 Datasette(datasette install datasette-arrows),导出对话框便会新增这一 Arrow 选项:

Export data modal for the threads table. The TSV and CSV exports are now joined by Arrow, showing "All 927 rows" and the text Apache Arrow IPC stream, for DuckDB, pandas, Polars and other tools. There is a Download button and a Copy URL button.

此截图来自 Datasette 的 main 分支——最新稳定版尚未将 Arrow 等流式格式与 TSV 和 CSV 一起归类在“此表所有行”区域,但这功能将在下一个 alpha 版本中推出。

原始来源: Simon Willison

评论 (0)