返回全部资讯
Simon Willison 博客T2·开发与工程

Datasette 新增 Apache Arrow 流式导出插件

原标题:datasette-arrows 0.1a0
42AI 研判分

Datasette 1.0a43 开放了插件实现流式导出格式的能力,作者随即发布 datasette-arrows 0.1a0,为导出对话框新增 Apache Arrow IPC 流选项,可直接对接 DuckDB、pandas 与 Polars。该插件由 Claude Fable 5.2 几乎一次生成,属于生态工具链的小幅扩展。

报道正文

Datasette 1.0a43 added the ability for plugins to implement streaming export formats. Datasette core supports streaming CSV and TSV - you can export millions of lines of data from a table without needing to load it all into memory, because those two file formats support streaming data in chunks. The register_output_renderer() plugin hook can now be used to implement the same pattern for other formats.

I've learned never to release a new plugin feature without accompanying it with a plugin that uses it.

Claude Fable 5.2 suggested the Apache Arrow streaming format as a good option, and built this plugin in almost a single shot.

Add the plugin to Datasette (datasette install datasette-arrows) and the export dialog gains this new Arrow option:

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.

This screenshot is from Datasette's main branch - the most recent release doesn't yet group streaming formats such as Arrow with the TSV and CSV in the "All rows in this table" section, but that's coming in the next alpha release.