Skip to content
TopicTracker
来自 HackerNews查看原文
译文语言译文语言

Datasette-apps:运行在 Datasette 内部的应用程序

Datasette-apps 是一个让开发者直接在 Datasette 内部构建和运行应用程序的框架。它将 Datasette 从数据浏览工具扩展为轻量级应用平台,支持插件化开发和数据驱动的交互应用,无需额外部署独立的 Web 服务。

背景速读

- Datasette 是一个开源的数据探索和发布工具,由知名独立开发者 Simon Willison 创建。它让用户可以像操作 API 一样查询 SQLite 数据库,并自动生成可分享的页面。<br>- Datasette Apps 是该项目的一个新方向:它引入了一种「应用」机制,允许在 Datasette 实例内部运行小型 Web 应用。这些应用可以用 SQL 查询或 JavaScript 构建,且与 Datasette 的认证、权限系统深度集成。<br>- 这意味着 Datasette 不再只是一个数据浏览工具,而是变成了一个可以托管轻量数据应用的平台——类似将「数据库仪表盘」或「内部工具」直接部署在数据集旁边。<br>- 这一扩展延续了 Willison 近年来推动的「可组合数据工具」理念,强调让非工程师也能轻松发布交互式数据产品。

相关报道

  • Datasette Apps is a new plugin that lets users host custom HTML+JavaScript apps inside Datasette in a sandboxed iframe with a Content Security Policy. The apps can run read-only SQL queries and optionally write data via stored queries. The feature supports AI-assisted creation through copyable prompts for LLMs.

  • Simon Willison released an alpha package, micropython-wasm, that runs MicroPython code inside a WebAssembly sandbox via wasmtime. It enforces memory/CPU limits, restricts file and network access, and supports persistent state and host functions for safely executing untrusted code in Python applications.

  • Simon Willison created a GitHub repository that converts Mozilla's browser-compat-data into a ~66MB SQLite database, using an AI-generated script and GitHub Actions to build and host the database on an orphan branch with open CORS headers for easy access via Datasette Lite.

  • Datasette 1.0a35 has been released, introducing a new "Create table" interface and JSON API, an "Alter table" feature with table modification capabilities, and official documentation for template context variables as a stable API for custom templates until version 2.0.

  • Simon Willison created a test harness to explore using the Origin Private File System (OPFS) with Pyodide, with the goal of enabling Datasette Lite to edit persistent SQLite files stored on the user's computer directly in the browser.