Using SQLCipher with Python

While we do not have a turnkey solution for Python there are a few options available. We have Commercial customers who have utilized both SQLCipher for Windows and SQLCipher for macOS using the Python client library pysqlcipher3.

When using Python on Windows, you'll want to use the SQLCipher for Windows package.

Here are instructions on Windows referring to the sqlcipher-windows-X.X.X.zip file which is sold by Zetetic.:

  1. Download or clone the pysqlcipher3 repo from https://github.com/rigglemania/pysqlcipher3
  2. Unzip the sqlcipher-windows-X.X.X.zip
  3. In the root of the pysqlcipher3 folder, create a folder called sqlcipher
  4. Copy sqlite3.h, sqlite3ext.h and sqlite3session.h from sqlcipher-windows-X.X.X\\binaries\\x64 into the sqlcipher folder
  5. Copy sqlcipher-windows-X.X.X\\binaries\\x64\\sqlcipher.lib into the root of the pysqlcipher3 folder
  6. Copy sqlcipher-windows-X.X.X\\binaries\\x64\\sqlcipher.dll into the folder where python.exe is installed or to c:\\windows\\system32
  7. Run python setup.py build_ext --include-dirs .
  8. Run python setup.py install

Zetetic Commercial Edition support covers SQLCipher itself, the libraries we distribute directly, and their stable API. It does not extend out to the Python package, or the boundary where Python packages are linking to or calling the SQLCipher library. Of course, if there is an issue with the SQLCipher binary Zetetic provides, we would work with you to resolve it.

For more advanced integrations with Python, please reach out to us regarding our SQLCipher Enterprise program.

This package can be purchased directly from the Zetetic Store and licensed software is delivered immediately upon payment. A free trail is also available.

Get SQLCipher »

If you have additional comments or questions please contact us.