skillfed

sqlcipher3

DB-API 2.0 interface for SQLCipher 4.x

sqlcipher3 v0.6.2 238.6K downloads/30d#8,934 on PyPI125
Permissive license MIT AGING released

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 sqlcipher3

uv

uv add sqlcipher3

poetry

poetry add sqlcipher3

Installing 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

Programming Language :: CProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: DatabaseTopic :: Database :: Database Engines/ServersTopic :: Database :: Front-EndsTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python Modules

Tags

encrypted sqlite database pythonsqlcipher python bindingencrypted sql databasedb-api sqlite encryptionsqlcipher3 python driversecure database connectionsqlite with encryption
encryptiondatabase-driversqlite

More Software Development packages