Simon Willison has released alchemy-utils 0.1a0, an alpha prototype that implements the same core API as his sqlite-utils library but backed by SQLAlchemy so it can work with multiple database engines.
What was done and how
The project began as a short research spike: Willison tasked Codex and GPT-5.6 Sol Ultra with producing a prototype that supports sqlite-utils-style methods — including insert, upsert, insert_all, upsert_all, create, update, and table introspection — while using SQLAlchemy as the backend.
The brief included testing against PostgreSQL, SQLite and DuckDB, using ~/dev/sqlite-utils as a reference, creating a git repository with frequent commits, initializing the project with uv init, and following red/green TDD with pytest. The ~/dev/django-sql-dashboard project was suggested as an example for PostgreSQL test patterns.
AI involvement and outcome
According to Willison, very few follow-up prompts were required before the project reached a state suitable for an alpha release. The result is the alchemy-utils 0.1a0 package now available as an experimental prototype.
Command-line examples and sample output
Willison shares a one-liner that lists rows from a local PostgreSQL copy of his blog database:
uvx --with 'alchemy-utils[postgresql]' alchemy-utils rows 'postgresql+psycopg://simon@localhost:5432/simonwillisonblog' redirects_redirect
The output begins like this:
[ { "id": 2328, "domain": "simonwillison.net", "path": "2020/May/21/apple-photos-sqlite/", "target": "/2020/May/21/dogsheep-photos/", "created": "2020-05-21T13:03:46.591692-07:00" }, { "id": 3, "domain": "feeds.simonwillison.net", "path": "swn-links", "target": "https://simonwillison.net/atom/links/", "created": "2017-10-01T14:12:54.820729-07:00" }
Another example shows importing a CSV of every tree in San Francisco into a DuckDB database, with the schema created automatically to match the file:
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
Performance note: the first run of this import took nearly an hour; after optimisations by Codex it was reduced to around 35 seconds.
Why this matters
alchemy-utils aims to bring the simple, convenient API of sqlite-utils to multiple database backends without forcing users to manage backend-specific details. Although the project is in an early alpha state, the author reports it contains enough functionality to be useful and provides practical command-line examples for PostgreSQL and DuckDB.
Tags: databases, postgresql, projects, python, sql, sqlalchemy, sqlite, sqlite-utils, duckdb, coding-agents, codex



