Skip to main content

pysqlcipher3static

This is a fork of pysqlcipher3 that includes statically linked binary wheel distributions to make it easier to install.

Install with:

pip install pysqlcipher3static

Note: this project is no longer being actively maintained. Security vulnerabilities may exist in this code. Use at your own risk.

This library is a fork of pysqlcipher targeted for use with Python 3. It is still in the beta state, although this library contains minimal new code and instead heavily pulls from the core Python sqlite source code while linking against libsqlcipher.

  • Small modifications for static build (c) 2024 Chris Arderne
  • Python 3 packaging for SQLCipher (c) 2015 David Riggleman
  • Packaging for SQLCipher (c) 2013-2014 Kali Kaneko
  • Original code (c) 2004-2007 Gerhard Häring

Usage

You have to pass the PRAGMA key before doing any operations::

from pysqlcipher3 import dbapi2 as sqlite
conn = sqlite.connect('test.db')
c = conn.cursor()
c.execute("PRAGMA key='password'")
c.execute('''create table stocks (date text, trans text, symbol text, qty real, price real)''')
c.execute("""insert into stocks values ('2006-01-05','BUY','RHAT',100,35.14)""")
conn.commit()
c.close()

Windows build

Follow the same instructions as above except for the following:

  1. Make sure that you are using OpenSSL-Win64
  2. Set the PATH to the Win64 environment
  3. Copy the OpenSSL folder
  4. Build the amalgamation and install with the latest Python x64

SQLCipher compatibility issues

The encryption has default compatibility with the SQLCipher version installed on your machine. You have to execute PRAGMA cipher_compatibility = 3 before doing any operations on a database encrypted with SQLCipher version 3 when a newer version is installed. Keep in mind, you have to add PRAGMA cipher_compatibility after PRAGMA key::

from pysqlcipher3 import dbapi2 as sqlite
conn = sqlite.connect('test.db')
c = conn.cursor()
c.execute("PRAGMA key='password'")
c.execute("PRAGMA cipher_compatibility = 3")
c.execute('''create table stocks (date text, trans text, symbol text, qty real, price real)''')
c.execute("""insert into stocks values ('2006-01-05','BUY','RHAT',100,35.14)""")
conn.commit()
c.close()

Release files for pysqlcipher3static 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysqlcipher3static 2.0.1
File Size Uploaded
pysqlcipher3static-2.0.1.tar.gz 2.6 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for pysqlcipher3static 2.0.1
File
pysqlcipher3static-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
pysqlcipher3static-2.0.1-cp312-cp312-macosx_14_0_arm64.whl CPython 3.12 CPython 3.12 macOS 14.0+ ARM64 Details
pysqlcipher3static-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
pysqlcipher3static-2.0.1-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details
pysqlcipher3static-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
pysqlcipher3static-2.0.1-cp310-cp310-macosx_14_0_arm64.whl CPython 3.10 CPython 3.10 macOS 14.0+ ARM64 Details
pysqlcipher3static-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
pysqlcipher3static-2.0.1-cp39-cp39-macosx_14_0_arm64.whl CPython 3.9 CPython 3.9 macOS 14.0+ ARM64 Details

Total release size: 54.3 MB

Release files / pysqlcipher3static-2.0.1.tar.gz

Download URL pysqlcipher3static-2.0.1.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
0f5d17766cd0427b3d5288572f9dc6594fed02cbef5562144381fb5dcab37697
BLAKE2b-256 checksum
How to use checksums
e7ecde7e9c3a4ffb0c7e9c6f678c3ea14e1c26bbb6bdc824f9adfcc07dfa8786
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / pysqlcipher3static-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pysqlcipher3static-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 7.5 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
6009cef15300dd58033e54ce1d2d0a7b0c8f552d116380aa4adb72a9aa766905
BLAKE2b-256 checksum
How to use checksums
26fdc3b57e9f1e258973d5fbb1a6b3cc9e6e2c8c414c142a8824d09ebe08e514
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / pysqlcipher3static-2.0.1-cp312-cp312-macosx_14_0_arm64.whl

Download URL pysqlcipher3static-2.0.1-cp312-cp312-macosx_14_0_arm64.whl
Size 5.5 MB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
dafb5202f17197c90f25c7129f3bee3cd1e38b0baabcd376c2cab8be6086bb81
BLAKE2b-256 checksum
How to use checksums
87f43d55d97e55659a64225dfae0408a0a40075dd842f9359f098fd532b19c70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / pysqlcipher3static-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pysqlcipher3static-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 7.5 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
66e7231e05229627ac311b89b1d6d1288c3a105e2d7bae2cf45bb5163713a78a
BLAKE2b-256 checksum
How to use checksums
117a836b844bacfe1be82f6f0d2074801440a474b6711e065ec6ea19d53b19c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / pysqlcipher3static-2.0.1-cp311-cp311-macosx_14_0_arm64.whl

Download URL pysqlcipher3static-2.0.1-cp311-cp311-macosx_14_0_arm64.whl
Size 5.5 MB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
547383eec98616c6ffb7e0edb07cf88066c975e6c43819721c22a1cefd07fb13
BLAKE2b-256 checksum
How to use checksums
700a9531bf336c3d288980ea83982b9c993988bae919c50e365bce6dad908227
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / pysqlcipher3static-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pysqlcipher3static-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 7.4 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ac861f3e1cc1131321cbed0c32577b9529a54db861c659d5cd031989a0c09d69
BLAKE2b-256 checksum
How to use checksums
3ccc22312e81fd0db85dc818a3c3cfe568eb3357718c5922cb9e451bb4f0c0a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / pysqlcipher3static-2.0.1-cp310-cp310-macosx_14_0_arm64.whl

Download URL pysqlcipher3static-2.0.1-cp310-cp310-macosx_14_0_arm64.whl
Size 5.5 MB
Tags CPython 3.10 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
06fe2929c0b96aa8ab9bc738d7a58a6aef4a34e652ae4ca9f604d6f825342fb5
BLAKE2b-256 checksum
How to use checksums
5fd6b6d7c7f85fa22387c3dcbf0d2bdc2580a29d4043e9e0fce9d1a802b1df95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / pysqlcipher3static-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pysqlcipher3static-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 7.4 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
325fb224eaffbb010c09e27f5eeef3fd35dc1c099d662a719c333f9beaa414cd
BLAKE2b-256 checksum
How to use checksums
d72667ac6885b38f4cc0319c62dcacb446f2fc54a78c3513dffa3eaba802dfe1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / pysqlcipher3static-2.0.1-cp39-cp39-macosx_14_0_arm64.whl

Download URL pysqlcipher3static-2.0.1-cp39-cp39-macosx_14_0_arm64.whl
Size 5.5 MB
Tags CPython 3.9 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
14861b79a9dc522e19cf9da9a891511ba7647db730c78fa8c3e6181ac19c04d9
BLAKE2b-256 checksum
How to use checksums
1a1bf711c64252851fa48cfde6bd37769545bcbdfb00f8300925842e2358a07f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

2.0.1 This release

9 release files

2.0.0

3 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page