sqlite3
A module in the Python standard library for working with SQLite databases. It provides an interface conforming to the DB-API 2.0 specification and is the default way for Python developers to access SQLite.
Timeline (last 90 days)
The sqlite3 interface is designed for generality and standardization rather than for the convenience of everyday use, causing developers to repeatedly write boilerplate code such as creating connections, creating cursors, executing SQL, iterating over result tuples, manually mapping to dictionaries or objects, handling commits and rollbacks, and closing connections.
Even when using row_factory to convert results into sqlite3.Row objects, type conversions for bool, dates, JSON fields and the like still need to be written by hand.
Libraries such as sqlite3, psycopg2, and pymysql all implement the DB-API 2.0 specification.
The standard library sqlite3 does not expose any interface for creating custom virtual tables at all, whereas APSW fully maps this mechanism to Python through classes such as VTTable and VTCursor.
For the vast majority of applications, the standard library sqlite3 is a reasonable default choice; APSW is more suitable for building SQLite extensions, database tools, and scenarios that need to extract the full performance of SQLite.
All Facts (6)
macOS上sqlite3等内置REPL使用的是libedit而非readline,这是其交互体验较差的原因
90%UnverifiedThe sqlite3 interface is designed for generality and standardization rather than for the convenience of everyday use, causing developers to repeatedly write boilerplate code such as creating connections, creating cursors, executing SQL, iterating over result tuples, manually mapping to dictionaries or objects, handling commits and rollbacks, and closing connections.
50%UnverifiedEven when using row_factory to convert results into sqlite3.Row objects, type conversions for bool, dates, JSON fields and the like still need to be written by hand.
50%UnverifiedLibraries such as sqlite3, psycopg2, and pymysql all implement the DB-API 2.0 specification.
50%UnverifiedThe standard library sqlite3 does not expose any interface for creating custom virtual tables at all, whereas APSW fully maps this mechanism to Python through classes such as VTTable and VTCursor.
50%UnverifiedFor the vast majority of applications, the standard library sqlite3 is a reasonable default choice; APSW is more suitable for building SQLite extensions, database tools, and scenarios that need to extract the full performance of SQLite.
50%