A port of pysqlite (sqlite3) to sqlite4