pysqlite3 0.6.2


pip install pysqlite3

  Latest version

Released: Nov 05, 2026

Project Links

Meta
Author: Charles Leifer
Requires Python: >=3.9

Classifiers

Programming Language
  • Python :: 3
  • C

Topic
  • Database
  • Database :: Front-Ends
  • Software Development
  • Software Development :: Libraries :: Python Modules

pysqlite3

Note: moving forward, cysqlite (docs) is where all new development is happening for packaging a SQLite driver as a self-contained package. End note

This library takes the SQLite module from Python 3 and packages it as a separately-installable module.

This may be useful for creating SQLite modules capable of working with other versions of SQLite (via the amalgamation option).

Additional features:

  • User-defined window functions (requires SQLite >= 3.25)
  • Flags and VFS an be specified when opening connection
  • Incremental BLOB I/O, bpo-24905
  • Improved error messages, bpo-16379
  • Simplified detection of DML statements via sqlite3_stmt_readonly.
  • Sqlite native backup API (also present in standard library 3.7 and newer).

A completely self-contained binary package (wheel) is available starting with version 0.6.0. This package contains the latest release of SQLite compiled with numerous extensions, and requires no external dependencies.

If you prefer to build yourself or link against the system libsqlite3 then a source distribution is also available on PyPI.

pysqlite3 with statically-linked sqlite3

Install a wheel using pip:

$ pip install pysqlite3

pysqlite with system sqlite3

If you intend to use the system SQLite, you can install with:

$ pip install --no-binary pysqlite3

Alternatively you can clone or download the repo and use setup.py to build pysqlite3 linked against the system SQLite:

$ python setup.py build

Building a statically-linked library

In order to build a statically-linked library locally you will need the sqlite amalgamation sources inside the root of the git checkout. These can be easily obtained by running a helper script:

# This will download sqlite3.c and sqlite3.h into your checkout.
$ python build-scripts/fetch_source.py

Now you can compile the extension:

$ python setup.py build

To build pysqlite3 statically-linked against a particular version of SQLite, you need to obtain the SQLite3 source code and copy sqlite3.c and sqlite3.h into the source tree.

# Download the latest release of SQLite source code and build the source
# amalgamation files (sqlite3.c and sqlite3.h).
$ wget https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release \
    -O sqlite.tar.gz
$ tar xzf sqlite.tar.gz
$ cd sqlite/
$ ./configure
$ make sqlite3.c

# Copy the sqlite3 amalgamation files into the root of the pysqlite3 checkout
# and run build_static + build:
$ cp sqlite/sqlite3.[ch] pysqlite3/
$ cd pysqlite3
$ python setup.py build

You now have a statically-linked, completely self-contained pysqlite3.

Wheel compatibility matrix

Platform CPython 3.9 CPython 3.10 CPython 3.11 CPython 3.12 CPython 3.13 CPython 3.14 CPython 3.15
macosx_11_0_arm64
manylinux_2_28_x86_64
musllinux_1_2_x86_64
win32
win_amd64

Files in release

pysqlite3-0.6.2-cp310-cp310-macosx_11_0_arm64.whl (953.7KiB)
pysqlite3-0.6.2-cp310-cp310-manylinux_2_28_x86_64.whl (4.4MiB)
pysqlite3-0.6.2-cp310-cp310-musllinux_1_2_x86_64.whl (4.4MiB)
pysqlite3-0.6.2-cp310-cp310-win32.whl (730.9KiB)
pysqlite3-0.6.2-cp310-cp310-win_amd64.whl (931.4KiB)
pysqlite3-0.6.2-cp311-cp311-macosx_11_0_arm64.whl (953.7KiB)
pysqlite3-0.6.2-cp311-cp311-manylinux_2_28_x86_64.whl (4.4MiB)
pysqlite3-0.6.2-cp311-cp311-musllinux_1_2_x86_64.whl (4.4MiB)
pysqlite3-0.6.2-cp311-cp311-win32.whl (730.9KiB)
pysqlite3-0.6.2-cp311-cp311-win_amd64.whl (931.5KiB)
pysqlite3-0.6.2-cp312-cp312-macosx_11_0_arm64.whl (954.4KiB)
pysqlite3-0.6.2-cp312-cp312-manylinux_2_28_x86_64.whl (4.4MiB)
pysqlite3-0.6.2-cp312-cp312-musllinux_1_2_x86_64.whl (4.4MiB)
pysqlite3-0.6.2-cp312-cp312-win32.whl (731.3KiB)
pysqlite3-0.6.2-cp312-cp312-win_amd64.whl (932.1KiB)
pysqlite3-0.6.2-cp313-cp313-macosx_11_0_arm64.whl (954.0KiB)
pysqlite3-0.6.2-cp313-cp313-manylinux_2_28_x86_64.whl (4.4MiB)
pysqlite3-0.6.2-cp313-cp313-musllinux_1_2_x86_64.whl (4.4MiB)
pysqlite3-0.6.2-cp313-cp313-win32.whl (731.1KiB)
pysqlite3-0.6.2-cp313-cp313-win_amd64.whl (931.6KiB)
pysqlite3-0.6.2-cp314-cp314-macosx_11_0_arm64.whl (954.0KiB)
pysqlite3-0.6.2-cp314-cp314-manylinux_2_28_x86_64.whl (4.4MiB)
pysqlite3-0.6.2-cp314-cp314-musllinux_1_2_x86_64.whl (4.4MiB)
pysqlite3-0.6.2-cp314-cp314-win32.whl (746.6KiB)
pysqlite3-0.6.2-cp314-cp314-win_amd64.whl (960.6KiB)
pysqlite3-0.6.2-cp315-cp315-macosx_11_0_arm64.whl (955.1KiB)
pysqlite3-0.6.2-cp315-cp315-manylinux_2_28_x86_64.whl (4.5MiB)
pysqlite3-0.6.2-cp315-cp315-musllinux_1_2_x86_64.whl (4.5MiB)
pysqlite3-0.6.2-cp315-cp315-win32.whl (746.6KiB)
pysqlite3-0.6.2-cp315-cp315-win_amd64.whl (960.7KiB)
pysqlite3-0.6.2-cp39-cp39-macosx_11_0_arm64.whl (953.7KiB)
pysqlite3-0.6.2-cp39-cp39-manylinux_2_28_x86_64.whl (4.4MiB)
pysqlite3-0.6.2-cp39-cp39-musllinux_1_2_x86_64.whl (4.4MiB)
pysqlite3-0.6.2-cp39-cp39-win32.whl (730.9KiB)
pysqlite3-0.6.2-cp39-cp39-win_amd64.whl (931.6KiB)
pysqlite3-0.6.2.tar.gz (40.1KiB)
No dependencies