Sqlalchemy access to Firefox's places.sqlite

Kent Tenney ktenney at gmail.com
Wed Nov 17 18:46:11 CET 2010


Howdy,

Lazy, wanting to access Firefox's places.sqlite via Sqlalchemy.

How about this:
Sqlite Manager -> places.sqlite -> Export Wizard -> table name sqlite_manager

this produces file sqlite_manager.sql which looks like:

BEGIN TRANSACTION;
INSERT INTO "sqlite_master" VALUES('table','moz_bookmarks','moz_bookmarks',
  2,'CREATE TABLE moz_bookmarks (id INTEGER PRIMARY KEY,type INTEGER,
  fk INTEGER DEFAULT NULL, parent INTEGER, position INTEGER, title LONGVARCHAR,
  keyword_id INTEGER, folder_type TEXT, dateAdded INTEGER,
lastModified INTEGER)');
INSERT INTO "sqlite_master" VALUES('index','moz_bookmarks_itemindex',
  'moz_bookmarks',3,'CREATE INDEX moz_bookmarks_itemindex ON
moz_bookmarks (fk, type)');

...

Is there an easy way to go from this sql to Sqlalchemy code?

Thanks,
Kent



More information about the Python-list mailing list