Urgent.News

What's breaking now, across thousands of outlets.

AI

alchemy-utils 0.1a0

Release: alchemy-utils 0.1a0 I've long pondered what a database agnostic version of my sqlite-utils Python library and CLI utility might look like. This morning (literally a shower project) I tasked Codex and GPT-5.6 Sol Ultra with building a prototype: Do a research spike to see what it would take to build a library with the same core API as SQLite-utils - in particular the insert and upsert and…

Simon Willison, a developer, has recently unveiled alchemy-utils 0.1a0, a database-agnostic version of his SQLite-utils Python library and CLI utility. Inspired by a shower project, Willison turned to AI, specifically Codex and GPT-5.6 Sol Ultra, to develop a prototype that would replicate the core API of SQLite-utils, including methods for insert, upsert, insert_all, upsert_all, create, and update, backed by SQLAlchemy for compatibility with multiple database engines.

The prototype was tested on PostgreSQL, SQLite, and DuckDB. Willison used the ~/dev/sqlite-utils repository as a reference and set up a new Git repository using uv init. The development followed TDD principles, with pytest being employed. For PostgreSQL tests, the developer referred to the structure of Django SQL dashboard for inspiration.

The resulting software allows users to list rows in a table, such as those in a local PostgreSQL copy of Simon Willison's blog database, using the command: "uvx --with alchemy-utils[postgresql] alchemy-utils rows postgresql+psycopg://simon@localhost:5432/simonwillisonblog redirects_redirect". For a DuckDB database containing all trees in San Francisco, with schema automatically crafted to match a file, the command is "curl https://raw.githubusercontent.com/simonw/sf-tree-history/refs/heads/main/Street_Tree_List.csv | uvx --with alchemy-utils[duckdb] alchemy-utils insert duckdb:////tmp/trees.db trees - --csv".

The creation process took around an hour initially, but Simon Willison optimized it, reducing the time to approximately 35 seconds.

Written by urgent.news from Simon Willison's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at simonwillison.net →

More in AI

More from Wednesday 12 August →