sqlite-utils 4.1
Simon Willison · Simon Willison · 2026-07-11
Simon Willison announces sqlite-utils 4.1, adding inline Python code for row generation, column type overrides for CSV imports, index dropping, stdin SQL support, automatic primary key inference for upsert, and the ability to toggle SQLite strict table mode.
Appears in
Extraction
Topics: sqlitepythondeveloper-toolsopen-source-softwareai-assisted-programming
Claims
- sqlite-utils 4.1 adds a --code option to insert and upsert commands that accepts inline Python defining a rows() function or iterable, allowing data generation without an input file.
- A new --type flag lets users override the automatically inferred column type at table creation, solving long-standing issues with fields like ZIP codes that look numeric but should be stored as TEXT.
- The release adds table.drop_index() and a CLI drop-index command for dropping indexes by name, with optional ignore-if-missing behavior.
- Codex (GPT-5.6 Sol) was used to review open issues and suggest easy implementations, and was also instructed to manually exercise new features to find edge cases, catching two bugs before release.
- The new transform(strict=) option and --strict/--no-strict CLI flags allow converting existing SQLite tables between strict and non-strict mode, filling a gap in SQLite's own ALTER TABLE capabilities.
Key quotes
'Two more small features. I had Codex review all open issues and highlight the easiest ones!'
'Effectively telling the model to manually test its work, outside of the automated tests it had already written. This turned up two minor issues that we then fixed.'
Evan Hahn: 'Unfortunately, I don't think there's a way to ALTER a table to make it strict. I think you have to copy the data out of the non-strict table into the strict one.' [which sqlite-utils transform now handles]