← ALL NEWS

SIMON WILLISON · 12 Jul 2026

sqlite-utils 4.1

The sqlite-utils 4.1 release introduces several new features to the command-line tool and Python library for managing SQLite databases. Users can now use a new code option to generate rows for insertion directly from Python scripts, providing a flexible alternative to importing data from external files. Additionally, the tool now allows users to manually override column types during table creation, which helps preserve data formats like leading zeros in ZIP codes that might otherwise be misinterpreted as integers.

The update also simplifies database maintenance by adding commands to drop indexes by name and allowing SQL queries to be read directly from standard input. For existing tables, the upsert command can now automatically detect primary keys, removing the need for manual specification. Furthermore, the library now supports toggling SQLite strict mode for tables, a feature implemented by leveraging the existing table transformation mechanism to rebuild tables with the desired strictness settings.

These improvements were developed with the assistance of AI-driven code review and testing, which helped identify and resolve edge cases during implementation. By streamlining data insertion, schema management, and table configuration, these updates make sqlite-utils more efficient for developers who frequently interact with SQLite databases through the command line or Python scripts.

Read the original ↗