pysqleet 31.1.3

Last updated:

0 purchases

pysqleet 31.1.3 Image
pysqleet 31.1.3 Images
Add to Cart

Description:

pysqleet 31.1.3

Pysqleet is a Python wrapper around sqleet. It is a drop in replacement
for the standard libraries sqlite3.
Installation
pip install pysqleet
Usage
The usage is the same as sqlite3 with a few differences.

You can pass the kwarg key=[bytes, str, None] to sqleet.connect() and sqleet.Connection.
You can call connection.change_key(key: [bytes, str, None]) to change the key on an already
open database. Setting the key to None will decrypt the database, making it compatible with the traditional
sqlite3 lib.
A new exception type sqleet.AuthenticationError(sqleet.DatabaseError) is exposed,
which is raised on authentication based errors.

Example:
import sqleet


key = b"Key"
db_name = "test.sqlite3"

# Create a new encrypted db
con = sqleet.connect(db_name, key=key)
con.execute("create table test(col char);")
con.commit()
con.close()

# Try to open db with the wrong key, this fails
try:
con = sqleet.connect(db_name, key="The wrong key")
except sqleet.AuthenticationError:
print("Failed to open database")


# Remove the encryption on the created database
con = sqleet.connect(db_name, key=key)
con.change_key(None)
con.close()

Versioning
The versions (sqleet.__version__) first 2 places (major, minor) match the sqleet version used in the sources.
For example an sqleet version of 1.2.3 would have pysqleet version of 12.3. The last place (patch) is used
internally for pysqleet patches.
Sources
Pysqleet mixes source code from the below sources, with any modifications being noted in the copyright header
at the beginning of the file.

CPython v3.6.14 sqlite3 module. (
C Sources (used for ext _sqleet),
Python sources (used for sqleet py module) )
Sqleet v0.31.1 amalgamation

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.