{"id":23274,"library":"apsw-sqlite3mc","title":"APSW-SQLite3MultiCiphers","description":"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.","status":"active","version":"3.53.0.0","language":"python","source_language":"en","source_url":"https://github.com/utelle/apsw-sqlite3mc","tags":["apsw","sqlite3","multiple-ciphers","encryption","database"],"install":[{"cmd":"pip install apsw-sqlite3mc","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Import 'apsw' directly; the package exposes its API as 'apsw'.","wrong":"from apsw_sqlite3mc import some_module","symbol":"apsw","correct":"import apsw"},{"note":"Use 'apsw.Connection' not 'apsw.connect' (no such function).","wrong":"con = apsw.connect('test.db')","symbol":"Connection","correct":"con = apsw.Connection('test.db')"}],"quickstart":{"code":"import apsw\n\ncon = apsw.Connection('encrypted.db')\ncon.execute(\"PRAGMA key='your-encryption-key'\")\ncursor = con.cursor()\ncursor.execute('CREATE TABLE IF NOT EXISTS test (id INTEGER PRIMARY KEY)')\nprint('Table created successfully')\ncon.close()","lang":"python","description":"Creates an encrypted SQLite database using a password provided via PRAGMA."},"warnings":[{"fix":"Use 'apsw.Connection' instead of 'sqlite3.connect()'.","message":"The APSW API is not the same as the stdlib sqlite3 module. Use 'apsw.Connection' and 'apsw.Cursor' directly.","severity":"gotcha","affected_versions":"all"},{"fix":"Issue 'PRAGMA key=...' as the first operation after creating the connection.","message":"Encryption PRAGMA must be set immediately after opening the connection before any other operations.","severity":"gotcha","affected_versions":"all"},{"fix":"Set cipher parameters before setting the key, e.g., PRAGMA cipher_page_size=4096; PRAGMA key='...'.","message":"Some cipher settings (like cipher_page_size) must be set before the key PRAGMA.","severity":"gotcha","affected_versions":"all"},{"fix":"Check the SQLite3MultipleCiphers changelog for encryption defaults changes.","message":"Versioning 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.","severity":"breaking","affected_versions":">=3.53.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Reopen the connection or avoid closing it prematurely.","cause":"Trying to execute SQL on a connection that has been closed.","error":"apsw.ExecutionCompleteError: cannot operate on a closed database"},{"fix":"Check that the directory exists and is writable. Use absolute paths if needed.","cause":"File path not found or permission denied.","error":"apsw.ExecutionCompleteError: unable to open database file"},{"fix":"Verify the file is a SQLite database. If encrypted, provide the correct key via PRAGMA after opening.","cause":"Opening a file that is not a valid SQLite database or the key is incorrect.","error":"apsw.ExecutionCompleteError: file is not a database"},{"fix":"Check the APSW documentation for correct function names.","cause":"Trying to import a function that does not exist in APSW.","error":"ImportError: cannot import name 'some_function' from 'apsw'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}