semvec/pypi-packages huggingface dataset:
pysqleet 31.1.3
Drop in replacement for the std libs sqlite3 which enables encryption support for sqlite3
License: MIT
Requires Python: <3.9,>=3.6
Keywords: sqlite,sqlite3,sqleet,db,database,encryption

Pysqleet is a Python wrapper around [sqleet](https://github.com/resilar/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:
```python3
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](https://github.com/python/cpython/releases/tag/v3.6.14) sqlite3 module. (
[C Sources](https://github.com/python/cpython/tree/9a0099d1bf14bce417370aae6d55527417cda354/Modules/_sqlite) (used for ext _sqleet),
[Python sources](https://github.com/python/cpython/tree/9a0099d1bf14bce417370aae6d55527417cda354/Lib/sqlite3) (used for sqleet py module) )
- [Sqleet v0.31.1](https://github.com/resilar/sqleet/releases/tag/v0.31.1) amalgamation
Visual-Patterns 0.1.0
Programming practice exercises in pattern recognition, written in Python. Ideal for beginner programmers.
License: MIT

Visual Patterns
======

Programming practice exercises in pattern recognition, written in Python. Ideal for beginner programmers.

This uses the puzzles at [https://www.visualpatterns.org/](https://www.visualpatterns.org/) by Fawn Nguyen. The site and this module are licensed under a Creative Commons Attribution license.

THIS MODULE IS CURRENTLY UNDER CONSTRUCTION AND NOT WORKING YET.

Installation
------------

To install with pip, from the Command Prompt/terminal run:

    pip install visualpatterns

To run through the exercises, from the Command Prompt/terminal run:

    python -m visualpatterns

Or from the Python interactive shell, run:



Quickstart Guide
----------------

TODO - fill this in later

Contribute
----------

If you'd like to contribute to Visual Patterns, check out https://github.com/asweigart/visualpatterns