sqlcipher3
DB-API 2.0 interface for SQLCipher 4.x
What it is and what it does
sqlcipher3 wraps SQLCipher (an encrypted variant of SQLite) and exposes it through Python's standard DB-API 2.0 interface. It is based on pysqlite3 with modifications to work with SQLCipher's encryption layer, allowing you to create and query encrypted SQL databases from Python code. The package includes enhancements over the standard library sqlite3 module, such as user-defined window functions, incremental BLOB I/O, and a native backup API.
Installation offers two paths: building from source (which requires a C compiler and SQLCipher headers) or using prebuilt wheels for common platforms. The repository is actively maintained and has no known security vulnerabilities. It targets Python 3.9 and newer, with prebuilt wheels currently available for Python 3.10 and 3.11 on macOS, Linux, and Windows architectures.
Use it for:
- Building applications that require encrypted local databases without external server infrastructure.
- Migrating from standard SQLite to encrypted storage while keeping DB-API 2.0 compatibility.
- Storing sensitive user data (credentials, personal information) in a file-based encrypted database.
- Protects database files at rest; useful for mobile apps, desktop tools, or embedded systems.
- Incremental BLOB I/O for efficient handling of large binary objects within encrypted databases.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
sqlcipher3 is a Python DB-API 2.0 interface to SQLCipher, providing encrypted SQLite database access with features like user-defined window functions, incremental BLOB I/O, and native backup support.
Yes, if you need encrypted SQLite databases in Python. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and offers prebuilt wheels for common platforms. Install friction is moderate due to C compilation, but wheels reduce friction significantly. Not necessary if standard unencrypted SQLite meets your security requirements.
Install
sqlcipher3 on PyPI
pip
pip install sqlcipher3uv
uv add sqlcipher3poetry
poetry add sqlcipher3Installing sqlcipher3
Before you install
Medium install friction due to compiled C extensions; prebuilt wheels are available for Python 3.10 and 3.11 on common platforms (macOS, Linux, Windows), but building from source requires a C compiler and SQLCipher development headers. Repository is actively maintained with a recent commit on 2026-01-08.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute sqlcipher3 freely provided you include the license notice.
Quickstart
import sqlcipher3
conn = sqlcipher3.connect(':memory:')
conn.execute('PRAGMA key="password"')
cursor = conn.cursor()
cursor.execute('CREATE TABLE test (id INTEGER, name TEXT)')
conn.commit()
Requires Python >= 3.9; prebuilt wheels available for Python 3.10 and 3.11 on major platforms, but other versions may require building from source with a C compiler and SQLCipher development libraries.
Verify before relying
- Whether prebuilt wheels exist for Python 3.9 or Python 3.12+ versions beyond what the friction evidence shows.
- Performance characteristics and encryption overhead compared to standard sqlite3.
- Compatibility with the separate sqlcipher3-binary package and when to choose one over the other.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 219 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 238,598/month — #8,934 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sqlcipher3-0.6.2-cp310-cp310-macosx_10_9_universal2.whl; sqlcipher3-0.6.2-cp310-cp310-macosx_10_9_x86_64.whl; sqlcipher3-0.6.2-cp310-cp310-macosx_11_0_arm64.whl; sqlcipher3-0.6.2-cp310-cp310-manylinux_2_28_aarch64.whl; sqlcipher3-0.6.2-cp310-cp310-manylinux_2_28_i686.whl; sqlcipher3-0.6.2-cp310-cp310-manylinux_2_28_x86_64.whl; sqlcipher3-0.6.2-cp310-cp310-musllinux_1_2_aarch64.whl; sqlcipher3-0.6.2-cp310-cp310-musllinux_1_2_x86_64.whl; sqlcipher3-0.6.2-cp310-cp310-win32.whl; sqlcipher3-0.6.2-cp310-cp310-win_amd64.whl; sqlcipher3-0.6.2-cp310-cp310-win_arm64.whl; sqlcipher3-0.6.2-cp311-cp311-macosx_10_9_universal2.whl; sqlcipher3-0.6.2-cp311-cp311-macosx_10_9_x86_64.whl; sqlcipher3-0.6.2-cp311-cp311-macosx_11_0_arm64.whl; sqlcipher3-0.6.2-cp311-cp311-manylinux_2_28_aarch64.whl; sqlcipher3-0.6.2-cp311-cp311-manylinux_2_28_i686.whl; sqlcipher3-0.6.2-cp311-cp311-manylinux_2_28_x86_64.whl; sqlcipher3-0.6.2-cp311-cp311-musllinux_1_2_aarch64.whl; sqlcipher3-0.6.2-cp311-cp311-musllinux_1_2_x86_64.whl; sqlcipher3-0.6.2-cp311-cp311-win32.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
sqlcipher3-binaryA Python DB-API 2.0 interface to SQLCipher,…
permissive · top 15,000 on PyPI
sqlcipher3-wheelsProvides a Python DB-API 2.0 interface to…
permissive · top 15,000 on PyPI
pysqlite3pysqlite3 packages SQLite as a standalone…
permissive · top 15,000 on PyPI
sqlean.pyA drop-in replacement for Python's sqlite3…
permissive · top 5,000 on PyPI
pysqlite3-binaryProvides a self-contained SQLite database…
permissive · top 5,000 on PyPI
django-encrypted-model-fieldsWraps Django model fields with transparent…
permissive · top 15,000 on PyPI
dynamodb-encryption-sdkEncrypts and decrypts DynamoDB items…
permissive · top 15,000 on PyPI
djfernetProvides Fernet symmetric encryption for Django…
permissive · top 15,000 on PyPI
pymssqlpymssql provides a Python DB-API interface to…
copyleft · top 1,000 on PyPI
django-fernet-fields-v2Provides Fernet symmetric encryption for Django…
permissive · top 5,000 on PyPI