Simon Willison’s Weblog

Subscribe
Atom feed for sqlite-utils Random

237 posts tagged “sqlite-utils”

sqlite-utils is a Python library and command-line utility for creating and manipulating SQLite databases.

2020

Weeknotes: software carpentry, compiling modules for SQLite

Visit Weeknotes: software carpentry, compiling modules for SQLite

This week I completed the Software Carpentry instructor training course, added two foundational features to sqlite-utils and learned how to compile modules for SQLite.

[... 805 words]

Release sqlite-utils 2.21 — Python CLI utility and library for manipulating SQLite databases

Refactoring databases with sqlite-utils extract

Visit Refactoring databases with sqlite-utils extract

Yesterday I described the new sqlite-utils transform mechanism for applying SQLite table transformations that go beyond those supported by ALTER TABLE. The other new feature in sqlite-utils 2.20 builds on that capability to allow you to refactor a database table by extracting columns into separate tables. I’ve called it sqlite-utils extract.

[... 1,345 words]

Executing advanced ALTER TABLE operations in SQLite

Visit Executing advanced ALTER TABLE operations in SQLite

SQLite’s ALTER TABLE has some significant limitations: it can’t drop columns (UPDATE: that was fixed in SQLite 3.35.0 in March 2021), it can’t alter NOT NULL status, it can’t change column types. Since I spend a lot of time with SQLite these days I’ve written some code to fix this—both from Python and as a command-line utility.

[... 689 words]

Release sqlite-utils 2.20 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.19 — Python CLI utility and library for manipulating SQLite databases

Weeknotes: datasette-dump, sqlite-backup, talks

I spent some time this week digging into Python’s sqlite3 internals. I also gave two talks and recorded a third, due to air at PyGotham in October.

[... 928 words]

Release sqlite-utils 2.18 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.17 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.16.1 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.16 — Python CLI utility and library for manipulating SQLite databases

Weeknotes: Installing Datasette with Homebrew, more GraphQL, WAL in SQLite

Visit Weeknotes: Installing Datasette with Homebrew, more GraphQL, WAL in SQLite

This week I’ve been working on making Datasette easier to install, plus wide-ranging improvements to the Datasette GraphQL plugin.

[... 1,009 words]

Release sqlite-utils 2.15.1 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.15 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.14.1 — Python CLI utility and library for manipulating SQLite databases

sqlite-utils 2.14 (via) I finally figured out porter stemming with SQLite full-text search today—it turns out it’s as easy as adding tokenize=’porter’ to the CREATE VIRTUAL TABLE statement. So I just shipped sqlite-utils 2.14 with a tokenize= option (plus the ability to insert binary file data from stdin).

# 1st August 2020, 9:19 pm / full-text-search, projects, search, sqlite, sqlite-utils

Release sqlite-utils 2.14 — Python CLI utility and library for manipulating SQLite databases

Fun with binary data and SQLite

This week I’ve been mainly experimenting with binary data storage in SQLite. sqlite-utils can now insert data from binary files, and datasette-media can serve content over HTTP that originated as binary BLOBs in a database file.

[... 957 words]

Release sqlite-utils 2.13 — Python CLI utility and library for manipulating SQLite databases

sqlite-utils 2.12 (via) I’ve been experimenting with ways of improving BLOB support in Datasette and sqlite-utils. This new version of sqlite-utils includes a “sqlite-utils insert-files” command, which can recursively crawl directories for files and add their contents to SQLite with configurable columns containing their metadata.

I was inspired by Paul Ford who has been creating multi-GB SQLite databases of images and PDFs. It turns out that when disk space is cheap this is a pretty effective way of working with interesting corpuses of documents and images.

# 27th July 2020, 7:36 am / projects, sqlite, sqlite-utils

Release sqlite-utils 2.12 — Python CLI utility and library for manipulating SQLite databases

Weeknotes: datasette-copyable, datasette-insert-api

Visit Weeknotes: datasette-copyable, datasette-insert-api

Two new Datasette plugins this week: datasette-copyable, helping users copy-and-paste data from Datasette into other places, and datasette-insert-api, providing a JSON API for inserting and updating data and creating tables.

[... 953 words]

Weeknotes: SBA Covid-19 PPP loans, Datasette talks, Datasette plugin upgrades

Visit Weeknotes: SBA Covid-19 PPP loans, Datasette talks, Datasette plugin upgrades

This week I’ve mainly been exploring Small Business Administration Covid-19 loans data, pitching some talks and upgrading some plugins for compatibility with Datasette 0.44+.

[... 524 words]

Release sqlite-utils 2.11 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.10.1 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.10 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.9.1 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.9 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.8 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.7.2 — Python CLI utility and library for manipulating SQLite databases