Yes, I could have written yet another little Python script to do this, but it turns out there’s a really easy way to export a SQLite database table to a CSV file from the command-line interface.
% sqlite3 databasefile.sqlite
sqlite> .headers on
sqlite> .mode csv
sqlite> .output outputfile.csv
sqlite> select * from table_name;
And that’s it. Couldn’t be easier really.