Provided methods
open- connect to a dbexecute- execute a sql commmandclose- close a connection to a db
# Import using `sqlcipher`
import sqlcipher
# SQLiteDB takes in the name and key of the database
db = sqlcipher.open("test.db", "test1234")
# Execute will run an SQL command
print(db.execute("SELECT * FROM movies;"))
# Close the database connection
db.close()It has support for SQL parameterized strings
db.execute("INSERT INTO users (username, password) VALUES (?, ?)", ("Emily", "1Password"))
Wheels only exist for Linux x86-64.
pip install git+https://github.com/NeoSahadeo/pysqlcipher.gitFor a Windows build, please send a PR. You will have to compile it yourself, read the github workflow to see the general steps.
Linux Bash
git clone --depth=1 https://github.com/NeoSahadeo/pysqlcipher
cd pysqlcipher
git clone --depth=1 https://github.com/sqlcipher/sqlcipher
cd sqlcipher
./configure --with-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_EXTRA_INIT=sqlcipher_extra_init -DSQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown" \
LDFLAGS="-lcrypto"
make sqlite3.o
cd ..
make gen_soContributions welcome. Currently in need of a python package for pip.
For all binaries and sources that belong to ZETETIC LLC and that are used in bindings belong to and have the respected copyright of BSD 3-Clause License.
My source files are licensed under MIT