A TinyDB storage implementation that uses JSON and encryption.
Project description
tinydb-encrypted-jsonstorage
A TinyDB storage implementation that stores values as encrypted json.
Requirements
Python
OS Dependencies:
- python3, python3-venv, python3-pip
Get Sources
- git clone git@github.com:stefanthaler/tinydb-encrypted-jsonstorage.git
- cd tinydb-encrypted-jsonstorage
- python3 -m venv .env
- . .env/bin/activate.fish
- pip install -r requirements.txt
Build
- follow steps in "Get Sources"
- pip3 install -r requirements-building.txt
- python setup.py bdist_wheel
Test
- follow steps in "Get Sources"
- pip3 install -r requirements-building.txt
- python setup.py test
Install
Pip
- pip install tinydb-encrypted-jsonstorage
Pip + Git
- pip install git+git://github.com/stefanthaler/tinydb-encrypted-jsonstorag.git#egg=tinydb-encrypted-jsonstorage
Git + Local Pip
- Follow steps in "Build"
- pip install ./
Use
Create database
You can use the encrypted storage by adding setting storage parameter of the TinyDB initializer to the EncryptedJSONStorage class.
from tinydb import TinyDB
import tinydb_encrypted_jsonstorage as tae
KEY = "hello"
PATH = ".encrypted_db"
db = TinyDB(encryption_key=KEY, path=PATH, storage=tae.EncryptedJSONStorage)
Change encryption key
You can change the encryption key of the storage by accessing the storage property of your TinyDB database.
db = ...
db.storage.change_encryption_key("NEW_KEY"))
Other operations
For all the other operations, check the TinyDB manual.
Thanks
- Shields.io, for providing the github paypal button: https://shields.io/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for tinydb_encrypted_jsonstorage-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aaa26a31e6e05157099b3470e6eb5723b39cdb7b500fa130858c0c59aed4e42d |
|
MD5 | b0de1f0fe24b729fa76137c937d16b94 |
|
BLAKE2b-256 | ba76e4f4278f81fe711fc70e1c98cfe8c4edd2704d5baebd736aa608cf4902d2 |