coleifer/pysqlite3

Add a short example in the README

josephernest opened this issue · 2 comments

Hi,

It would be useful to add a short example of usage in the README, for example what's the standard way to import this library. Looking at the tests, it looks like it is:

from pysqlite3 import dbapi2 as sqlite

Is it the correct way to import it?

More generally, is there a way to replace the standard import sqlite3 by from pysqlite3 import sqlite3 to use it as a drop-in replacement?

It's just python, you can import it how you want, but from pysqlite3 import dbapi2 as sqlite3 gives you compat w/stdlib sqlite3.

Thanks @coleifer. Can we do import pysqlite3; conn = pysqlite3.connect('test.db'), in a similar way than the stdlib import sqlite3; conn = sqlite3.connect('test.db')?

This is linked to the question I posted here: https://stackoverflow.com/questions/68472969/duplicate-the-built-in-sqlite3-module-into-another-one-to-use-a-newer-version-o