README usage instructions
This commit is contained in:
38
README.rst
38
README.rst
@@ -9,13 +9,26 @@ Protect yourself and your customers with database encryption.
|
||||
Installation
|
||||
============
|
||||
|
||||
::
|
||||
|
||||
pip install cryptbase
|
||||
|
||||
You can also install the in-development version with::
|
||||
|
||||
pip install git+ssh://git@https://code.eghuro.com/cryptbase/python-cryptbase.git@master
|
||||
Usage
|
||||
============
|
||||
|
||||
You can use cryptbase with django ORM or witg SQLAlchemy.
|
||||
|
||||
To use with SQLAlchemy:
|
||||
|
||||
from cryptbase import EncryptedText
|
||||
sensitive = Column(EncryptedText(key=DB_KEY))
|
||||
|
||||
To use with django:
|
||||
|
||||
from cryptbase import EncryptedTextField
|
||||
sensitive = EncryptedTextField(key=DB_KEY)
|
||||
|
||||
DB_KEY is 32 bytes encryption key as hex encoded string. Fields behave as TEXT fields, data are transparently encrypted
|
||||
when storing into the database and decrypted on retrieval.
|
||||
|
||||
|
||||
Development
|
||||
@@ -24,20 +37,3 @@ Development
|
||||
To run all the tests run::
|
||||
|
||||
tox
|
||||
|
||||
Note, to combine the coverage data from all the tox environments run:
|
||||
|
||||
.. list-table::
|
||||
:widths: 10 90
|
||||
:stub-columns: 1
|
||||
|
||||
- - Windows
|
||||
- ::
|
||||
|
||||
set PYTEST_ADDOPTS=--cov-append
|
||||
tox
|
||||
|
||||
- - Other
|
||||
- ::
|
||||
|
||||
PYTEST_ADDOPTS=--cov-append tox
|
||||
|
||||
Reference in New Issue
Block a user