NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #3455 most downloaded on PyPI
Another Python SQLite Wrapper
Last release 2 months ago
26 Jul 2026
Release timing varies
gaps range from 8 days to 3 months
Nearly every release is documented
notes for 58 of 58 stable releases
1 version withdrawn
withdrawn after publishing
12 years old
59 releases · first in 2014
Blob implements io.RawIOBase allowing use by other modules expecting file like objects, such as compression. Several methods and attributes are added,
Blob implements io.RawIOBase allowing use by other modules expecting file like objects, such as compression. Several methods and attributes are added, and Blob.write() now returns the size written (used to be None). (APSW issue 623)
One column per quarter.
Fix an issue that could occur with connections and module unload ordering during finalization ( APSW issue 622 )
Fix an issue that could occur with connections and module unload ordering during finalization (APSW issue 622)
Async breaking changes: This SQLite release requires the database mutex for some APIs that it did not before. The following were direct values, but no…
pyodide (web assembly) builds are now published to pypi, thanks to version 4 of cibuildwheel.
Async breaking changes: This SQLite release requires the database mutex for some APIs that it did not before. The following were direct values, but now must be awaited: Connection.changes() Connection.get_autocommit() Connection.in_transaction Connection.last_insert_rowid() Connection.total_changes()
The closure extension was removed from SQLite extra by SQLite. Common table expressions are a better approach.
Remove the logger on module unload (APSW issue 620)
Reflects changes and updates in SQLite extra . The sqlite3_scrub binary has been removed - use VACUUM INTO instead.
Reflects changes and updates in SQLite extra. The sqlite3_scrub binary has been removed - use VACUUM INTO instead.
Reflects changes and updates in extra. The sqlite3_scrub binary has been removed - use VACUUM INTO instead.
…correctly reflect the current iterated row. Backwards incompatible change: description , get_description() , and description_full are now values - ie…
Async cursor iteration: Cursor attributes like bindings_names, sql, and is_readonly will always correctly reflect the current iterated row. Backwards incompatible change: description, get_description(), and description_full are now values - ie you can just use them directly and should not await them.
Async cursor iteration: Cursor attributes like ~Cursor.bindings_names, ~Cursor.sql, and ~Cursor.is_readonly will always correctly reflect the current iterated row. Backwards incompatible change: ~Cursor.description, ~Cursor.get_description, and ~Cursor.description_full are now values - ie you can just use them directly and should not await them.
ChangesetBuilder adds ChangesetBuilder.add_insert() , ChangesetBuilder.add_delete() , ChangesetBuilder.add_update() , and ChangesetBuilder.config() .
The SQLite 3.52.0 release was withdrawn , so the corresponding APSW one was too.
The SQLite 3.52.0 release was withdrawn, so the corresponding APSW one was too.
Includes all the changes from the 3.52.0.0 release, except SQLITE_UTF8_ZT and sqlite3_carray_bind_v2.
SQLite extra adds extensions and programs that require the zlib compression library, notably zipfile and sqlar
Includes all the changes from the 3.52.0.0 release listed below, except SQLITE_UTF8_ZT and sqlite3_carray_bind_v2 .
SQLite extra adds extensions and programs that require the zlib compression library , notably zipfile and sqlar
apsw.ext.DataClassRowFactory now defaults slots to True for dataclasses.dataclass() which saves a small amount of memory.
apsw.ext.DataClassRowFactory now defaults slots to True for dataclasses.dataclass() which saves a small amount of memory.
All objects that can be closed implement bool () which returns True while open and False when closed - Connection , Cursor , Backup , Blob , Session ,
All objects that can be closed implement bool() which returns True while open and False when closed - Connection, Cursor, Backup, Blob, Session, ChangesetBuilder, Rebaser.
All objects that can be closed implement ~object.__bool__ which returns True while open and False when closed - Connection, Cursor, Backup, Blob, Session, ChangesetBuilder, Rebaser.
JSON can be used as though it is a native type of SQLite, with automatic conversion of Python objects on writing and reading. (example)
JSON can be used as though it is a native type of SQLite, with automatic conversion of Python objects on writing and reading. (example)
Connection.convert_binding (and Cursor.convert_binding) callback to allow conversion of bindings when executing SQL.
Connection.convert_jsonb (and Cursor.convert_jsonb) callback to allow conversion of JSONB when reading query results. (JSONB is SQLite’s binary internal parsed format for quick operations on JSON.)
3 functions for working directly with JSONB allowing direct conversion between Python objects and JSONB, without having to go through the intermediate JSON text format.
Added apsw.ext.Function() for calling SQL functions directly from Python.
When using with (Connection context manager) you can set the outer transaction mode to DEFERRED (default) / IMMEDIATE / EXCLUSIVE. (APSW issue 578)
Changeset.apply() now takes filter_change parameter for allowing filtering on individual change level, taking advantage of sqlite3changeset_apply_v3
Updated Connection.status() to use 64 bit API, and apsw.ext.ShowResourceUsage() to show TEMPBUF_SPILL. (pragma cache_size controls the amount of temp/cache memory available.)
The percentile extension is enabled when enabling all extensions, which is standard for pypi downloads. It enables several percentile, median, and related SQL functions.
The carray extension is enabled when enabling all extensions, which is standard for pypi downloads. apsw.carray() allows binding bulk numbers, strings, and blobs to a query. See the example.
SQLITE_SCM_ constants (BRANCH, TAGS, DATETIME) are available on the module if built with the amalgamation.
apsw.ext.generate_series_sqlite() updated to exactly match SQLite’s behaviour. apsw.ext.generate_series() is recommended as it matches other databases.
Updated apsw.unicode to support Unicode 17.0 which adds 4,803 new codepoints, and updated line breaking, along with other small tweaks.
The Geopoly extension (GeoJSON access to RTree) is enabled when --enable-all-extensions is used with setup.py. This includes pypi builds.
This is the final release supporting Python 3.9.
PyPI binary builds are available for:
PyPI binary builds are available for:
preupdate_hook() is available. The commit and rollback hooks let you provide multiple callbacks, multiplex by APSW. apsw.ext.Trace() can now show upda
preupdate_hook() is available. The commit and rollback hooks let you provide multiple callbacks, multiplex by APSW. apsw.ext.Trace() can now show updates, and transaction begin, commit, and rollback.
PyPi builds now use cibuildwheel version 3 which advances the minimum supported Linux distribution. It is configured to continue building both 32 and
PyPi builds now use cibuildwheel version 3 which advances the minimum supported Linux distribution. It is configured to continue building both 32 and 64 bit binaries..
- Source - Install - Changelogs - Documentation No user visible changes.
No user visible changes.
Full support for the Session extension
Full support for the Session extension
Added Connection.setlk_timeout(), apsw.mapping_setlk_timeout_flags, and enabled the timeout for amalgamation builds such as PyPI.
Shell open command allows specifying flags to open a connection, and connection command shows flags used for each open. (APSW issue 557)
Type stubs updated to collections.abc.Buffer (Python 3.12+) wherever some bytes are taken. Buffers have always been used, but Python 3.12 added typing.
Shell dump command handles generated columns correctly. (APSW issue 556)
Shell dump command handles generated columns correctly. (APSW issue 556)
- Source - Install - Changelogs - Documentation No APSW changes.
No APSW changes.
Connection.set_progress_handler() allows multiple callbacks (multiplexed by APSW).
Connection.set_progress_handler() allows multiple callbacks (multiplexed by APSW).
Added apsw.ext.query_limit to limit total row count and execution time within a block. (APSW issue 520)
Connection.config() updated with new DBCONFIG options
Adjustments for SQLite’s new build process.
You can pass any Python objects into SQLite, and return them when used as runtime values such as functions. SQLite’s pointer passing interface is used
You can pass any Python objects into SQLite, and return them when used as runtime values such as functions. SQLite’s pointer passing interface is used behind the scenes. (APSW issue 521)
Source releases are also available in tar format (APSW issue 548), and have updated source release signing instructions. (APSW issue 549)
Shared cache (2006) is omitted when APSW includes the amalgamation like PyPI builds. This is recommended by SQLite, has been discouraged for a long time. apsw.enable_shared_cache() will raise an exception if called and the shared cache has been omitted. You can see what options are in effect in apsw.compile_options. If you were using it for shared memory databases then use the memdb VFS.
Added apsw.ext.page_usage_to_svg() which shows database usage as SVG (example). Available as shell .pages-svg command.
Added apsw.ext.page_usage_to_svg() which shows database usage as SVG (example). Available as shell .pages-svg command.
Documentation on how to build for packagers such as those maintaining Linux and BSD distributions.
Documentation on how to build for packagers such as those maintaining Linux and BSD distributions.
Documentation on how to build for pyodide, the Python WASM implementation that runs in the browser and NPM. PyPI does not accept pyodide packages yet.
A command line tool apsw is defined which invokes the shell. This also allows using uvx apsw without having to explicitly install APSW.
Added apsw.ext.analyze_pages() which uses dbstat to provide useful information about the pages making up the database, and fragmentation. The shell .pages command shows it in a pretty form.
As a side effect it loses the word_wrap parameter (breaking change).
Support for Python 3.8 removed (APSW issue 539).
The readonly database statistics virtual table (dbstat) is enabled by default for PyPI builds, and when --enable-all-extensions is passed to manual builds.
Added recursive triggers and optimize to apsw.bestpractice.
Multiple callbacks can be present for Connection.trace_v2() with APSW ensuring they are all called (APSW issue 502)
Connection.trace_v2() callback information now has trigger, id, and total_changes fields.
Added Connection.data_version for getting a change counter. pragma data_version doesn’t update when changes are made on the same connection, only others.
Added apsw.ext.ShowResourceUsage() for getting resource and SQLite usage in a context block, and also use it for the shell timer command.
Added apsw.ext.Trace() for tracing SQL execution, row and change counting, and timing per statement for use in a context block.
Added FTS5 support including registering and calling tokenizers, and auxiliary functions. The apsw.fts5 module provides many additional classes and methods for working with FTS5, including tokenizers for HTML, JSON, regular expressions, support tokenizers for synonyms, stop words, transformers, and a Table class that wraps access to a FTS5 table (including creating one) with search(), more_like(), and query_suggest(). apsw.fts5query can parse, modify, and reconstruct queries. The shell gets a ftsq command for issuing queries.
Added apsw.unicode which implements Unicode algorithms for determining codepoint groups making up a user perceived character, word and sentence splitting, and where line breaks can be made. These are used to make provided FTS5 tokenizers and auxiliary functions fully Unicode aware. There are many additional methods such as getting categories, stripping diacritics, case folding, width when output to a terminal, text wrapping, and more.
apsw.ext.format_query_table() uses apsw.unicode to get widths and line breaks more accurate. As a side effect it loses the word_wrap parameter (breaking change).
The shell dump command outputs the application_id in addition to the user_version.
The shell dump command outputs the application_id in addition to the user_version.
PyPI binary builds for Python 3.13 now available, as well as older Python ARM64 are available.
apsw.ext.query_info() provides the count and names of bindings parameters. (APSW issue 528)
apsw.ext.query_info() provides the count and names of bindings parameters. (APSW issue 528)
Address how errors are handled in VFS xRandomness routine, that is only called once by SQLite to seed its random number generator. (APSW issue 526)
Added Connection.vfsname() and updated corresponding shell command to get the diagnostic names of the vfs stack for the connection. (APSW issue 525)
Do not cache Connection.pragma() statements to avoid encryption keys, or pragmas that run during prepare from being retained. (APSW issue 522)
Connection.pragma() adds keyword schema argument to run pragma against attached databases. (APSW issue 524)
apsw.ext.query_info provides the count and names of bindings parameters. (528)
Address how errors are handled in VFS xRandomness routine, that is only called once by SQLite to seed its random number generator. (526)
Added Connection.vfsname and updated corresponding shell command to get the diagnostic names of the vfs stack for the connection. (525)
Do not cache Connection.pragma statements to avoid encryption keys, or pragmas that run during prepare from being retained. (522)
Connection.pragma adds keyword schema argument to run pragma against attached databases. (524)
Adjusted levels in apsw.ext.log_sqlite() to be lower for some SQLite messages like SQLITE_SCHEMA and SQLITE_NOTICE_RECOVER_WAL (APSW issue 518)
Adjusted levels in apsw.ext.log_sqlite() to be lower for some SQLite messages like SQLITE_SCHEMA and SQLITE_NOTICE_RECOVER_WAL (APSW issue 518)
Previous source releases were signed with PGP. Starting with this release Sigstore’s cosign tool is used (instructions). (APSW issue 512)
- Source - Install - Changelogs - Documentation No APSW changes.
No APSW changes.
Minor doc and tests change due to changed behaviour of sqlite3_serialize on an empty database, used by Connection.serialize().
Minor doc and tests change due to changed behaviour of sqlite3_serialize on an empty database, used by Connection.serialize().
- Source - Install - Changelogs - Documentation No APSW changes
No APSW changes
Correctly handle NULL/None VFS filenames (APSW issue 506)
Correctly handle NULL/None VFS filenames (APSW issue 506)
Added logger parameter to apsw.ext.log_sqlite() to use a specific logging.Logger (APSW issue 493)
Added logger parameter to apsw.ext.log_sqlite() to use a specific logging.Logger (APSW issue 493)
Added apsw.ext.result_string() to turn an result code into a string, taking into account if it is extended or not.
Provide detail when C implemented objects are printed. For example connections include the filename. (APSW issue 494)
Added URIFilename.parameters() (APSW issue 496)
URIFilename are only valid for the duration of the VFS.xOpen() call. If you save and use the object later you will get an exception. (APSW issue 501)
Added virtual table VTTable.Integrity() support.
Added virtual table VTTable.Integrity() support.
On 64 bit platforms with the amalgamation, SQLITE_MAX_MMAP_SIZE is set to 256 terabytes. SQLite’s default limit is 2GB. (APSW issue 491)
Connection.create_aggregate_function() can take a class with step and final methods. (APSW issue 421)
Connection.create_aggregate_function() can take a class with step and final methods. (APSW issue 421)
Corrected non PEP 8 compliant names. The old names remain as aliases to the new ones, and your code will not break.
Connection.create_aggregate_function can take a class with step and final methods. (421)
Corrected non 8 compliant names. The old names remain as aliases to the new ones, and your code will not break.
Exception handling has been updated, with multiple exceptions in the same SQLite control flow being chained together. Previously more would have used
Exception handling has been updated, with multiple exceptions in the same SQLite control flow being chained together. Previously more would have used the unraisable mechanism. (APSW issue 489)
Only use alloca with msvc because it doesn't support VLA. The arrays are used for fastcall. (APSW issue 487)
All C code calling into Python and all C code called by Python uses vectorcall / fastcall (see PEP 590) which reduces the overhead of passing and rece
All C code calling into Python and all C code called by Python uses vectorcall / fastcall (see PEP 590) which reduces the overhead of passing and receiving positional and keyword arguments. (APSW issue 477 APSW issue 446):
Conversion of arguments from Python values to C values drops generic PyArg_ParseTupleAndKeywords in favour of direct processing which is more efficient and allows better exception messages.
Running speedtest with a VFS that inherits all methods went from being 17% slower than pure SQLite to 2% slower.
A virtual table benchmark takes 35% less time. (Remember that benchmarks are best case!)
The shell JSON output modes have been fixed. Mode 'json' outputs a json array, while mode 'jsonl' does newline delimited json objects, aka json lines. (APSW issue 483)
This is the last version that supports Python 3.6 and Python 3.7 (both end of life). The policy as stated in the about page is that there will be one
This is the last version that supports Python 3.6 and Python 3.7 (both end of life). The policy as stated in the about page is that there will be one more APSW release after a Python version goes end of life supporting that Python version. (APSW issue 471)
Added best practice module (APSW issue 460)
apsw.ext.log_sqlite() outputs SQLite warnings at warning level. (APSW issue 472)
sqlite3_stmt_explain is wrapped available as a explain keyword parameter on execute/executemany methods. (APSW issue 474)
Added documentation and helper class for implementing custom pragmas in your own Virtual File System (VFS) (APSW issue 464)
Reduced overhead of the Column method when using apsw.ext.make_virtual_module() (APSW issue 465)
This is the last version that supports Python 3.6 and Python 3.7 (both end of life). The policy as stated in the about page is that there will be one more APSW release after a Python version goes end of life supporting that Python version. (471)
Added best practice module (460)
apsw.ext.log_sqlite outputs SQLite warnings at warning level. (472)
sqlite3_stmt_explain is wrapped available as a explain keyword parameter on execute/executemany methods. (474)
Added documentation and helper class for implementing custom pragmas in your own VFS (464)
Reduced overhead of the Column method when using apsw.ext.make_virtual_module (465)
Backwards incompatible change: VFS If you override xCurrentTime, then you will need to override xCurrentTimeInt64 in the same way, or exclude xCurrent…
Work with SQLite compiled with SQLITE_OMIT_DEPRECATED. Connection.setprofile() was changed from using the deprecated sqlite3_profile to sqlite3_trace_v2 giving the same results. When including the amalgamation, SQLITE_OMIT_DEPRECATED is defined. (APSW issue 443)
Shell updates adding various commands to match the SQLite shell, as well as code and documentation improvements. (APSW issue 397)
Added Connection.read() and apsw.ext.dbinfo() to provide information from the database and journal/wal files. The shell command .dbinfo displays it.
Added apsw.vfs_details(). The shell command .vfslist displays it.
Implemented VFS method xCurrentTimeInt64. The default SQLite VFS no longer provide xCurrentTime (floating point version) if SQLITE_OMIT_DEPRECATED is defined, so this is needed for inheritance to work. (APSW issue 451)
Backwards incompatible change: VFS If you override xCurrentTime, then you will need to override xCurrentTimeInt64 in the same way, or exclude xCurrentTimeInt64 in VFS, or use iVersion of 1.
speedtest now shows summary statistics, and improved help text. (APSW issue 444)
SQLITE_ENABLE_COLUMN_METADATA is enabled when installing APSW from PyPI (binary or source). (APSW issue 435)
SQLITE_ENABLE_COLUMN_METADATA is enabled when installing APSW from PyPI (binary or source). (APSW issue 435)
Type stubs and typing information in the documentation use newer Python conventions such as | instead of Union and list instead of typing.List, being more concise and readable. (A recent Python is required to use them, but they have no effect at runtime.) (APSW issue 438)
Shell: Errors when SQLite are preparing a statement now show the relevant extract of the query, and where the error was detected.
Shell: Output modes table (ASCII line drawing, lots of sanitization), box (Unicode line drawing) and qbox (box with quoted values) available. Python 3.7+ (APSW issue 420)
Shell: if started interactively then box is the default mode (list remains the default in non-interactive)
Added Connection.pragma() to execute pragmas and get results. (APSW issue 432)
Added Cursor.get returning query results with the least amount of structure. (APSW issue 389)
Fixed execution tracers should return comment text for comment only queries, and add Cursor.has_vdbe. (APSW issue 433)
Ensure that all applicable options are implemented for apsw.config(), Connection.config() and similar. (APSW issue 431)
Added apsw.sleep() (APSW issue 419)
Strings for apsw.VFS.xNextSystemCall() are interned avoiding memory leaks. (APSW issue 430)
Detect unbound recursion not handled by CPython, and handle better. (APSW issue 425)
Fixed APSW issue 412 in apsw.ext.make_virtual_module().
Fixed APSW issue 412 in apsw.ext.make_virtual_module().
Added apsw.connections() to get all connections. (APSW issue 416)
sys.unraisablehook() is called correctly (APSW issue 410)
Be stricter where bool values are expected (eg VTTable.BestIndex()), only accepting int and bool. Previously you could for example supply strings and lists, which were almost certainly unintended errors.
Backwards incompatible change: Bindings using a dictionary with a missing key now result in a KeyError exception. You can use allow_missing_dict_bindi…
Backwards incompatible change: Bindings using a dictionary with a missing key now result in a KeyError exception. You can use allow_missing_dict_bindings() to restore the old behaviour. (APSW issue 392)
Virtual table updates:
VTTable.BestIndexObject() is now available which provides IndexInfo exposing full control (APSW issue 332, APSW issue 329, APSW issue 278, APSW issue 188)
IndexInfo.set_aConstraintUsage_in() can have in values passed all at once to VTCursor.Filter()
Exceptions in VTTable.FindFunction() are now reported as an unraisable exception because it isn't possible to tell SQLite about the error.
VTTable.FindFunction() can now return (int, callable) to allow for virtual table specific function overloads. (APSW issue 269)
Added Connection.vtab_config() and Connection.vtab_on_conflict() (APSW issue 189, APSW issue 190)
Connection.createmodule() lets you have eponymous, eponymous_only, and read_only modules. (APSW issue 196)
Virtual table updates can avoid having to provide all column values when only a subset are changing. See apsw.no_change, Connection.createmodule() use_no_change parameter, VTCursor.ColumnNoChange() and VTTable.UpdateChangeRow() (APSW issue 402)
All virtual table methods are supported - added iVersion 2 and 3. You can specify the iVersion in Connection.createmodule() (APSW issue 128)
apsw.ext.make_virtual_module() makes it very easy to turn a Python function into a virtual table module.
apsw.ext.generate_series() and apsw.ext.generate_series_sqlite() added. (APSW issue 380)
apsw.format_sql_value() now outputs floating point NaN, positive and negative infinity, and signed zero exactly as SQLite does (APSW issue 398)
Added apsw.ext.format_query_table() for handy table output with auto column sizes, colour, word wrap etc.
Added Connection.is_interrupted().
Backwards incompatible change: Bindings using a dictionary with a missing key now result in a KeyError exception. You can use allow_missing_dict_bindings to restore the old behaviour. (392)
Virtual table updates:
VTTable.BestIndexObject is now available which provides IndexInfo exposing full control (332, 329, 278, 188)
IndexInfo.set_aConstraintUsage_in can have in values passed all at once to VTCursor.Filter
Exceptions in VTTable.FindFunction are now reported as an unraisable exception because it isn't possible to tell SQLite about the error.
VTTable.FindFunction can now return (int, callable) to allow for virtual table specific function overloads. (269)
Added Connection.vtab_config and Connection.vtab_on_conflict (189, 190)
Connection.create_module lets you have eponymous, eponymous_only, and read_only modules. (196)
Virtual table updates can avoid having to provide all column values when only a subset are changing. See apsw.no_change, Connection.create_module use_no_change parameter, VTCursor.ColumnNoChange and VTTable.UpdateChangeRow (402)
All virtual table methods are supported - added iVersion 2 and 3. You can specify the iVersion in Connection.create_module (128)
apsw.ext.make_virtual_module makes it very easy to turn a Python function into a virtual table module.
apsw.ext.generate_series and apsw.ext.generate_series_sqlite added. (380)
apsw.format_sql_value now outputs floating point NaN, positive and negative infinity, and signed zero exactly as SQLite does (398)
Added apsw.ext.format_query_table for handy table output with auto column sizes, colour, word wrap etc.
Added Connection.is_interrupted.
Implemented window functions (APSW issue 292)
Implemented window functions (APSW issue 292)
Function flags can be specified to Connection.createscalarfunction() and Connection.createaggregatefunction(). Added apsw.mapping_function_flags. (APSW issue 384)
Added Connection.trace_v2() with apsw.mapping_trace_codes and apsw.mapping_statement_status (APSW issue 383)
Ensure all SQLite APIs are wrapped. Connection.system_errno, apsw.strlike(), apsw.strglob(), apsw.stricmp(), apsw.strnicmp(), Connection.filename_wal, Connection.filename_journal, Connection.table_exists(), Connection.column_metadata(), Error.error_offset, Connection.cacheflush(), Connection.release_memory(), apsw.hard_heap_limit(). Connection.drop_modules() (APSW issue 382)
When an unraisable exception happens, sqlite3_log is now called so you will have context within SQLite’s actions. sys.unraisablehook is now called first, and if it doesn’t exist then sys.excepthook as before. (APSW issue 385)
When the wrong type is given for a function argument, the error message now includes the parameter name and function signature. (APSW issue 358)
Let SQLite do size checking instead of APSW for strings and blobs. (APSW issue 387)
Added apsw.ext.log_sqlite() which installs a handler that forwards SQLite messages to the logging module.
Added set_default_vfs() and unregister_vfs() taking vfs names. The test suite also unregisters ZipVFS (APSW issue 394)
Implemented window functions (292)
Function flags can be specified to Connection.create_scalar_function and Connection.create_aggregate_function. Added apsw.mapping_function_flags. (384)
Added Connection.trace_v2 with apsw.mapping_trace_codes and apsw.mapping_statement_status (383)
Ensure all SQLite APIs are wrapped. Connection.system_errno, apsw.strlike, apsw.strglob, apsw.stricmp, apsw.strnicmp, Connection.filename_wal, Connection.filename_journal, Connection.table_exists, Connection.column_metadata, Error.error_offset, Connection.cache_flush, Connection.release_memory, apsw.hard_heap_limit. Connection.drop_modules (382)
When an unraisable exception happens, sqlite3_log is now called so you will have context within SQLite's actions. sys.unraisablehook is now called first, and if it doesn't exist then sys.excepthook as before. (385)
When the wrong type is given for a function argument, the error message now includes the parameter name and function signature. (358)
Let SQLite do size checking instead of APSW for strings and blobs. (387)
Added apsw.ext.log_sqlite which installs a handler that forwards SQLite messages to the logging module.
Added set_default_vfs and unregister_vfs taking vfs names. The test suite also unregisters ZipVFS (394)
Fixed regression in statement cache update (version 3.38.1-r1) where trailing whitespace in queries would be incorrectly treated as incomplete executi
Fixed regression in statement cache update (version 3.38.1-r1) where trailing whitespace in queries would be incorrectly treated as incomplete execution (APSW issue 376)
Added Various interesting and useful bits of functionality (APSW issue 369)
Added more Pythonic attributes as an alternative to getters and setters, including Connection.in_transaction, Connection.exectrace, Connection.rowtrace, Cursor.exectrace, Cursor.rowtrace, Cursor.connection (APSW issue 371)
Completed: To the extent permitted by CPython APIs every item has the same docstring as this documentation. Every API can use named parameters. The type stubs cover everything including constants. The type stubs also include documentation for everything, which for example Visual Studio Code displays as you type or hover. There is a single source of documentation in the source code, which is then automatically extracted to make this documentation, docstrings, and docstrings in the type stubs.
Example/Tour updated and appearance improved (APSW issue 367).
Fixed regression in statement cache update (version 3.38.1-r1) where trailing whitespace in queries would be incorrectly treated as incomplete execution (376)
Added ext (369)
Added more Pythonic attributes as an alternative to getters and setters, including Connection.in_transaction, Connection.exec_trace, Connection.row_trace, Cursor.exec_trace, Cursor.row_trace, Cursor.connection (371)
Completed: To the extent permitted by CPython APIs every item has the same docstring as this documentation. Every API can use named parameters. The type stubs cover everything including constants. The type stubs also include documentation for everything, which for example Visual Studio Code displays as you type or hover. There is a single source of documentation in the source code, which is then automatically extracted to make this documentation, docstrings, and docstrings in the type stubs.
example updated and appearance improved (367).
Added Connection.cache_stats() to provide more information about the statement cache.
Added Connection.cache_stats() to provide more information about the statement cache.
Cursor.execute() now uses sqlite_prepare_v3 which allows supplying flags.
Cursor.execute() has a new can_cache parameter to control whether the query can use the statement cache. One example use is with authorizers because they only run during prepare, which doesn’t happen with already cached statements.
(The Cursor.execute() additional parameters are keyword only and also present in Cursor.executemany(), and the corresponding Connection.execute() and Connection.executemany() methods.)
Added Cursor.is_readonly, Cursor.is_explain, and Cursor.expanded_sql.
Updated processing named bindings so that types registered with collections.abc.Mapping (such as collections.UserDict) will also be treated as dictionaries. (APSW issue 373)
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Test no longer fails if APSW was compiled without SQLITE_ENABLE_COLUMN_METADATA but sqlite3 was separately compiled with it. APSW should be compiled with the same flags as sqlite3 to match functionality and APIs. (APSW issue 363)
–use-system-sqlite-config setup.py build_ext option added to allow Matching APSW and SQLite options. (APSW issue 364)
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
PyPI now includes Python 3.11 builds.
Instead of using scripts, you can now run several tools directly:
tests: python3 -m apsw.tests [options]
tracer: python3 -m apsw.trace [options]
speed tester: python3 -m apsw.speedtest [options]
shell: python3 -m apsw [options]
The shell class has moved from apsw.Shell to apsw.shell.Shell (APSW issue 356). You can still reference it via the old name (ie existing code will not break, except on Python 3.6).
Shell: On Windows the native console support for colour is now used (previously a third party module was supported).
You can use –definevalues in setup.py build_ext to provide compiler defines used for configuring SQLite. (APSW issue 357)
If SQLITE_ENABLE_COLUMN_METADATA is enabled then Cursor.description_full is available providing all the column metadata available. (APSW issue 354)
Connection.cursor_factory attribute is now present and is used when Connection.cursor() is called. Added Connection.execute() and Connection.executemany() which automatically obtain the underlying cursor. See customizing connections and cursors in the Tips. (APSW issue 361)
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Version numbering scheme change: Instead of a -r1 style suffix, there is .0 style suffix (APSW issue 340)
Updated building for PyPI to include more compiled platforms, including aarch64 (Linux) and universal (MacOS). Windows binaries are no longer separately provided since PyPI has them.
When the amalgamation is included into APSW, SQLITE_MAX_ATTACHED is set to 125 if not defined, up from the default of 10.
Updated typing information stubs with more detail and include docstrings. This is still ongoing, but core functionality is well covered. (APSW issue 338) (APSW issue 381)
Corrected the tips log handler of extended result code (APSW issue 342)
Added Connection.db_names() (APSW issue 343)
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
APSW is now on PyPI, so you can: pip install apsw (Thanks to several people behind the scenes who helped with the various pieces to make this happen.)
Removed support for setup.py downloading the in-development (aka fossil) version of SQLite.
Shell exit for –version etc cleanly exits (APSW issue 210)
Python 3.11 (APSW issue 326) now works.
PyPy3 compiles and mostly works (APSW issue 323).
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Implemented Connection.serialize() and Connection.deserialize(). They turn a database into bytes, and bytes into a database respectively.
Allow any subclass of VFS to implement WAL, not just direct subclasses. (APSW issue 311)
Added constants:
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Added SQLITE_IOERR_VNODE constant.
Windows builds for Python 3.5 are now provided.
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Added SQLITE_FCNTL_RBU and SQLITE_FCNTL_ZIPVFS constants.
setup’s fetch command can now get arbitrary fossil versions. For example specify fossil-e596a6b6.
Update tests due to a change in Python 3.5 (exception returned with invalid strings for system calls changed from TypeError to ValueError).
Adjusted some internal detection related to the fork checker
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Added deterministic parameter to Connection.createscalarfunction() (APSW issue 187)
Switched to new SQLite API returning 64 bit values for status() (APSW issue 191)
Added deterministic parameter to Connection.create_scalar_function() ( APSW issue 187 )
Switched to new SQLite API returning 64 bit values for status() ( APSW issue 191 )
Added deterministic parameter to Connection.create_scalar_function (187)
Switched to new SQLite API returning 64 bit values for status (191)
Removed SQLITE_GET_LOCKPROXYFILE, SQLITE_SET_LOCKPROXYFILE, SQLITE_LAST_ERRNO file control constants. These are deprecated - use the versions with FCN…
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Fixed column description caching which could be preserved between multiple statements in the same execution (APSW issue 186)
Updated documentation building tool to use new database of information from the SQLite site. This is simpler and more reliable. (Previously used site scraping.)
Added SQLITE_AUTH_USER, SQLITE_FCNTL_LAST_ERRNO, SQLITE_FCNTL_WAL_BLOCK, SQLITE_FCNTL_GET_LOCKPROXYFILE, and SQLITE_FCNTL_SET_LOCKPROXYFILE constants.
Removed SQLITE_GET_LOCKPROXYFILE, SQLITE_SET_LOCKPROXYFILE, SQLITE_LAST_ERRNO file control constants. These are deprecated - use the versions with FCNTL in their name (eg SQLITE_FCNTL_GET_LOCKPROXYFILE).
Added mappings for conflict resolution modes, virtual table configuration options and xShmLock VFS flags.
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
No APSW changes.
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
The column description is now cached on first request during a query so getting it is quick if called for every row.
Added SQLITE_CONFIG_PCACHE_HDRSZ and SQLITE_CONFIG_PMASZ constants, and support for them in config().
Added SQLITE_CHECKPOINT_TRUNCATE constant.
Update year in various places to 2015.
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
No APSW changes
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Fixed parsing of icu-config flags
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Added SQLITE_LIMIT_WORKER_THREADS constant
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Updated test suite for Python 3.4 unittest garbage collection changes (APSW issue 164, APSW issue 169)
Using the recommended build option of –enable-all-extensions turns on STAT4. Windows binaries include this too.
Updated test suite for Python 3.4 unittest garbage collection changes (164 169)
Using the recommended build option of --enable-all-extensions turns on STAT4. Windows binaries include this too.
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Added SQLITE_IOCAP_IMMUTABLE and SQLITE_FCNTL_WIN32_SET_HANDLE constants.
Source ▪ Downloads ▪ Changelogs ▪ Documentation
Source ▪ Downloads ▪ Changelogs ▪ Documentation
New constants
Added SQLITE_CONFIG_WIN32_HEAPSIZE, SQLITE_CONSTRAINT_ROWID and SQLITE_FCNTL_TRACE constants.
Your coding agent can read these notes before it upgrades. Set up the MCP server →