Registry / database / apsw-sqlite3mc

apsw-sqlite3mc

JSON →
library3.53.2.0pypypi✓ verified 84d ago

APSW-SQLite3MultiCiphers is a Python wrapper around SQLite3 Multiple Ciphers (SQLCipher alternative) using APSW. It provides advanced encryption features for SQLite databases with multiple cipher algorithms. Current version 3.53.0.0, based on APSW 3.53.0.0 and SQLite3MultipleCiphers 2.3.3. Release cadence follows SQLite releases.

pip install apsw-sqlite3mc
INSTALL
IMPORT
SIG · APSW-SQLITE3MC
A
apsw-sqlite3mc
databasepythonv3.53.2.0
Install
2.9s avg
Import
Disk
30MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.53.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 28.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.9s · import 0.000s · 30MB
30MB installed
● package 30MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

apsw
import apsw
from apsw_sqlite3mc import some_module
Import 'apsw' directly; the package exposes its API as 'apsw'.
Connection
con = apsw.Connection('test.db')
con = apsw.connect('test.db')
Use 'apsw.Connection' not 'apsw.connect' (no such function).

Creates an encrypted SQLite database using a password provided via PRAGMA.

import apsw con = apsw.Connection('encrypted.db') con.execute("PRAGMA key='your-encryption-key'") cursor = con.cursor() cursor.execute('CREATE TABLE IF NOT EXISTS test (id INTEGER PRIMARY KEY)') print('Table created successfully') con.close()
Debug
Known issues
gotchaThe APSW API is not the same as the stdlib sqlite3 module. Use 'apsw.Connection' and 'apsw.Cursor' directly.
fix
Use 'apsw.Connection' instead of 'sqlite3.connect()'.
affects: all
gotchaEncryption PRAGMA must be set immediately after opening the connection before any other operations.
fix
Issue 'PRAGMA key=...' as the first operation after creating the connection.
affects: all
gotchaSome cipher settings (like cipher_page_size) must be set before the key PRAGMA.
fix
Set cipher parameters before setting the key, e.g., PRAGMA cipher_page_size=4096; PRAGMA key='...'.
affects: all
breakingVersioning scheme changed from 3.x.y.z to 3.x.y.z (APSW based). Ensure you are using compatible encryption parameters if upgrading from older versions.
fix
Check the SQLite3MultipleCiphers changelog for encryption defaults changes.
affects: >=3.53.0.0
Errors
Common errors & fixes
apsw.ExecutionCompleteError: cannot operate on a closed database
Trying to execute SQL on a connection that has been closed.
fix
Reopen the connection or avoid closing it prematurely.
apsw.ExecutionCompleteError: unable to open database file
File path not found or permission denied.
fix
Check that the directory exists and is writable. Use absolute paths if needed.
apsw.ExecutionCompleteError: file is not a database
Opening a file that is not a valid SQLite database or the key is incorrect.
fix
Verify the file is a SQLite database. If encrypted, provide the correct key via PRAGMA after opening.
ImportError: cannot import name 'some_function' from 'apsw'
Trying to import a function that does not exist in APSW.
fix
Check the APSW documentation for correct function names.
Upgrade
Version history
3.53.2.0latest on PyPI · released Jun 6, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
42 hits · last 30 days
node
39
Resources