Simon Willison’s Weblog

Subscribe
Atom feed for sqlite-utils Random

223 posts tagged “sqlite-utils”

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

2020

Release sqlite-utils 2.2 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.1 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.0.1 — Python CLI utility and library for manipulating SQLite databases

2019

sqlite-utils 2.0: real upserts

I just released version 2.0 of my sqlite-utils library/CLI tool to PyPI.

[... 1,140 words]

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

Logging to SQLite using ASGI middleware

I had some fun playing around with ASGI middleware and logging during our flight back to England for the holidays.

[... 2,535 words]

Weeknotes: Python 3.7 on Glitch, datasette-render-markdown

Streaks is really working well for me. I’m at 12 days of commits to Datasette, 16 posting a daily Niche Museum, 19 of actually reviewing my email inbox and 14 of guitar practice. I rewarded myself for that last one by purchasing an actual classical (as opposed to acoustic) guitar.

[... 1,141 words]

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

Tracking PG&E outages by scraping to a git repo

Visit Tracking PG&E outages by scraping to a git repo

PG&E have cut off power to several million people in northern California, supposedly as a precaution against wildfires.

[... 868 words]

sqlite-utils 1.11. Amjith Ramanujam contributed an excellent new feature to sqlite-utils, which I’ve now released as part of version 1.11. Previously you could enable SQLite full-text-search on a table using the .enable_fts() method (or the “sqlite-utils enable-fts” CLI command) but it wouldn’t reflect future changes to the table—you had to use populate_fts() any time you inserted new records. Thanks to Amjith you can now pass create_triggers=True (or --create-triggers) to cause sqlite-utils to automatically add triggers that keeps the FTS index up-to-date any time a row is inserted, updated or deleted from the table.

# 3rd September 2019, 1:05 am / cli, full-text-search, projects, sqlite, sqlite-utils

Release sqlite-utils 1.11 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 1.10 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 1.9 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 1.8 — Python CLI utility and library for manipulating SQLite databases

Working with many-to-many relationships in sqlite-utils (via) I just released sqlite-utils 1.9 with syntactic sugar support for creating many-to-many relationships for records stored in SQLite databases.

# 4th August 2019, 3:57 am / projects, sqlite, sqlite-utils

Release sqlite-utils 1.7.1 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 1.7 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 1.6 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 1.3 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 1.2.2 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 1.2.1 — Python CLI utility and library for manipulating SQLite databases

Convert Locations.kml (pulled from an iPhone backup) to SQLite. I’ve been playing around with data from my iPhone using the iPhone Backup Extractor app and one of the things it exports for you is a Locations.kml file full of location history data. I wrote a tiny script using Python’s ElementTree XMLPullParser to efficiently iterate through the Placemarks and yield them as dictionaries, which I then batch-inserted into sqlite-utils to create a SQLite database.

# 14th June 2019, 12:45 am / kml, projects, sqlite, xml, sqlite-utils

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

paginate-json (via) I released a fun tiny utility: paginate-json, which knows how to paginate through JSON APIs that use the HTTP Link header for pagination. I built it so I could pull data from the GitHub API and pipe it directly into SQLite via sqlite-utils.

# 12th June 2019, 3:22 pm / json, projects, webapis, sqlite-utils

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

sqlite-utils 1.0. I just released sqlite-utils 1.0, with a couple of handy new features over 0.14: it can now automatically add columns to a database table if you attempt to insert data which doesn’t quite fit (using alter=True in the Python API or the --alter option to the “sqlite-utils insert” command). It also has the ability to output nested JSON column values on the command-line using the new --json-cols option. This is the first project I’ve marked as a 1.0 release in a very long time—I’ll be sticking to semver for this project from now on, bumping the major version only in the case of a backwards incompatible change.

# 25th May 2019, 1:20 am / projects, semantic-versioning, sqlite, versioning, sqlite-utils

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

sqlite-utils: a Python library and CLI tool for building SQLite databases

sqlite-utils is a combination Python library and command-line tool I’ve been building over the past six months which aims to make creating new SQLite databases as quick and easy as possible.

[... 1,237 words]