python database access module-level functions the following functions are defined by the sqlite moduleconnect(database [timeout [isolation_level [detect_types]]]creates connection to sqlite database database is string that specifies the name of the database file it can also be string ":memory:"in which case an in-memory database is used (note that this kind of database only persists as long as the python process remains running and would be lost on program exitthe timeout parameter specifies the amount of time to wait for an internal reader-writer lock to be released when other connections are updating the database by defaulttimeout is seconds when sql statements such as insert or update are useda new transaction is automatically started if one wasn' already in effect the isolation_level parameter is string that provides an optional modifier to the underlying sql begin statement that is used to start this transaction possible values are "(the default)"deferred""exclusive"or "immediatethe meaning of these settings is related to the underlying database lock and is as followsisolation level description "(empty string"deferreduse the default setting (deferredstarts new transactionbut does not acquire the lock until the first database operation is actually performed starts new transaction and guarantees that no other connections can read or write the database until changes are committed starts new transaction and guarantees that no other connection can make database modifications until changes are committed other connections can still read from the databasehowever "exclusive"immediatethe detect_types parameter enables some extra type detection (implemented by extra parsing of sql querieswhen returning results by default it is (meaning no extra detectionit can be set to the bitwise-or of parse_decltypes and parse_colnames if parse_decltypes is enabledqueries are examined for sql typenames such as "integeror "number( )in order to determine the type of result columns if parse_colnames is enabledspecial strings of the form "colname [typename](including the double quotescan be embedded into queries where colname is the column name and typename is the name of type registered with the register_converter(function described next these strings are simply transformed into colname when passed to the sqlite enginebut the extra type specifier is used when converting values in the results of query for examplea query such as 'select price as "price [decimal]from portfoliois interpreted as 'select price as price from portfolio'and the results will be converted according to the "decimalconversion rule register_converter(typenamefuncregisters new type name for use with the detect_types option to connect(typename is string containing the type name as it will be used in queriesand func is function that takes single bytestring as input and returns python datatype as result lib fl ff