Skip to main content

A TinyDB storage implementation that uses JSON and encryption.

Project description

Donate Build Status Coverage Status Documentation Status

License: MIT

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.

TODO

Thanks

  • Shields.io, for providing the github paypal and the MIT license button: https://shields.io/
  • travis-ci.org for providing free continuous integration for open source projects.
  • coveralls.io for providing free continuous code coverage reporting for open source projects.

Project details


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

File details

Details for the file tinydb_encrypted_jsonstorage-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tinydb_encrypted_jsonstorage-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

File hashes

Hashes for tinydb_encrypted_jsonstorage-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 048e5b7caf176d19b003f1a7183ad1bac46da0a7f86a6ad9968fee46e4b40c2d
MD5 0e3266641792ad068edc318d264848dc
BLAKE2b-256 358cbd5140a12511a8a9b86e1d73c3f5ecb299ad7a329c0ddaf322a3dfee0d95

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page