Skip to main content

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.

  1. You can pass the kwarg key=[bytes, str, None] to sqleet.connect() and sqleet.Connection.
  2. 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.
  3. 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.

Metadata

Release files for pysqleet 31.1.3

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

Source distribution (sdist)

Source distribution for pysqleet 31.1.3
File Size Uploaded
pysqleet-31.1.3.tar.gz 2.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pysqleet 31.1.3
File Interpreter ABI Platform
pysqleet-31.1.3-cp38-cp38-macosx_10_14_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.14+ x86-64 Details

Total release size: 3.5 MB

Release files / pysqleet-31.1.3.tar.gz

Download URL pysqleet-31.1.3.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
941e14b7533eeffcfee666c12e8ecf6e4b72317daafe3d0e788dc8540c8a277a
BLAKE2b-256 checksum
How to use checksums
c8e4b2271580532bb88e2c42d9f2b386f43e29675fc93269009c26240ebff9dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.2

Release files / pysqleet-31.1.3-cp38-cp38-macosx_10_14_x86_64.whl

Download URL pysqleet-31.1.3-cp38-cp38-macosx_10_14_x86_64.whl
Size 1.2 MB
Tags CPython 3.8 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
81130581fd94a0a88de10804730a0294883a2fe17edb59a5f8d77e86b3e87e80
BLAKE2b-256 checksum
How to use checksums
545dae0be5bcf68e03e03d86afa3fd745119e8b30627cb12743b7a609e487736
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.2

Release history Release notifications | RSS feed

This release

31.1.3 This release

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