pydoc > _sqlite3

๐Ÿ“› NAME

_sqlite3

๐Ÿš€ Quick Reference

Use CaseCommandDescription
๐Ÿ”Œ Open databaseconnect(database)Open a connection to SQLite database file or :memory:
๐Ÿ“ Execute SQLcursor.execute(sql)Execute a single SQL statement
๐Ÿ“Š Fetch all rowscursor.fetchall()Fetch all rows from resultset
๐Ÿ” Use context managerwith connect(...) as con:Auto-commit or rollback on exit
๐Ÿ’พ Commit transactioncon.commit()Commit pending transaction
โ†ฉ๏ธ Rollback transactioncon.rollback()Rollback to start of transaction
๐Ÿ“ฆ Backup databasecon.backup(target)Make a backup of the database
๐Ÿงช Execute scriptcon.executescript(sql_script)Execute multiple SQL statements at once

๐Ÿ“š MODULE REFERENCE

https://docs.python.org/3.10/library/_sqlite3.html

The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above.

๐Ÿท๏ธ CLASSES

๐Ÿ—ƒ๏ธ Connection

SQLite database connection object.

Methods defined here:

Data descriptors defined here:

๐Ÿ–‡๏ธ Cursor

SQLite database cursor class.

Methods defined here:

Data descriptors defined here:

โš ๏ธ Exception Classes

All exception classes inherit from builtins.Exception. The hierarchy is shown above in the class tree. Each exception class inherits the following methods and data descriptors from builtins.Exception:

Additionally, sqlite3.Error defines a data descriptor __weakref__ which is inherited by all its subclasses (DatabaseError, InterfaceError, and their subclasses). sqlite3.Warning directly inherits from builtins.Exception and also has __weakref__ defined.

๐Ÿ“„ PrepareProtocol

PEP 246 style object adaption protocol type.

Methods defined here:

๐Ÿ“Š Row

Methods defined here:

Static methods defined here:

๐Ÿ”ง FUNCTIONS

๐Ÿ”— adapt(...)

Adapt given object to given protocol.

โœ… complete_statement(statement)

Checks if a string contains a complete SQL statement.

๐Ÿ”Œ connect(...)

connect(database[, timeout, detect_types, isolation_level,
        check_same_thread, factory, cached_statements, uri])

Opens a connection to the SQLite database file database. You can use :memory: to open a database connection to a database that resides in RAM instead of on disk.

๐Ÿ” enable_callback_tracebacks(enable, /)

Enable or disable callback functions throwing errors to stderr.

๐Ÿ”€ enable_shared_cache(do_enable)

Enable or disable shared cache mode for the calling thread.

This method is deprecated and will be removed in Python 3.12. Shared cache is strongly discouraged by the SQLite 3 documentation. If shared cache must be used, open the database in URI mode using the cache=shared query parameter.

๐Ÿ“ฆ register_adapter(type, adapter, /)

Register a function to adapt Python objects to SQLite values.

๐Ÿ“ฆ register_converter(typename, converter, /)

Register a function to convert SQLite values to Python objects.

๐Ÿ“Š DATA

๐Ÿ“ FILE

/usr/lib/python3.10/lib-dynload/_sqlite3.cpython-310-x86_64-linux-gnu.so

_sqlite3
๐Ÿ“› NAME ๐Ÿš€ Quick Reference ๐Ÿ“š MODULE REFERENCE ๐Ÿท๏ธ CLASSES
๐Ÿ—ƒ๏ธ Connection ๐Ÿ–‡๏ธ Cursor โš ๏ธ Exception Classes ๐Ÿ“„ PrepareProtocol ๐Ÿ“Š Row
๐Ÿ”ง FUNCTIONS
๐Ÿ”— adapt(...) โœ… complete_statement(statement) ๐Ÿ”Œ connect(...) ๐Ÿ” enable_callback_tracebacks(enable, /) ๐Ÿ”€ enable_shared_cache(do_enable) ๐Ÿ“ฆ register_adapter(type, adapter, /) ๐Ÿ“ฆ register_converter(typename, converter, /)
๐Ÿ“Š DATA ๐Ÿ“ FILE

Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-01 15:49 @216.73.216.239
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^