[](https://gitlab.com/clearos/clearfoundation/datacustodian/commits/master) [](https://gitlab.com/clearos/clearfoundation/datacustodian/commits/master)
# DataCustodian Data Privacy Package Generator
DataCustodian generates other repositories for generalized data privacy and consent systems. The generation follows YML specification files that define the endpoints, handlers, authentication, validation, etc. for each component of a data privacy solution.
DataCustodian is built to work with decentralized and distributed systems to provide decentralized trust for storage and consent of data.
Check out the [API Documentation](https://clearos.gitlab.io/clearfoundation/datacustodian) and a [real-world implementation](https://gitlab.com/clearos/clearfoundation/clearshare).
## Installation
The package is available from the PyPI repository:
`bash pip install datacustodian `
## Generating a Package
Look at the documentation in docs/configs for an example setup that we use for the unit tests. Customize that to your own application and then run:
`bash datacustodian_app.py path/to/your/app_spec.yml --generate `
That will auto-generate the package and start the REST API server.
## Running Unit Tests
Running unit tests can prove to be a massive pain because the gitlab CI runner runs on docker. For a project like this that uses docker-compose, we have to use docker-in-docker according to their instructions. However, the documentation is sparse and there are lots of dead-ends… Here are the steps to get the docker-compose.yml file to work:
Install a local gitlab-runner using brew install gitlab-runner.
gitlab-runner exec docker –docker-privileged test. Notice that there is a –docker-privileged argument. Without that, the docker-in-docker won’t work.
Make sure all the multiaddr reference the docker service (which hosts all the other containers using dind).
tox should work, but for some reason: running the tests using tox produces connection refused errors, whereas running straight with pytest does not. Something about the tox environment screws things up.
## Problems with coverage
For an yet-unknown reason, when the unit tests run in the CI server using:
Only pytest, they pass with no issues.
coverage run with pytest, we get problems with connection reset errors, and connection refused errors.
Insead of trying to figure this out now, we just do the following:
Before pushing to the remote server, run coverage locally (which has no problems on MacOS).
Generate the coverage report -m > codecov.out.
Commit codecov.out and then push.
The CI server only runs pytest, but it also cat codecov.out so that the output includes the regular code coverage matrix. That way, gitlab still has correct statistics about code coverage.
Release files for datacustodian 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| datacustodian-1.2.1.tar.gz | 68.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datacustodian-1.2.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 180.1 kB
Release files / datacustodian-1.2.1.tar.gz
| Download URL | datacustodian-1.2.1.tar.gz |
|---|---|
| Size | 68.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4c71897094429d57079b89759d3ee245f33094c40d8690d5ebb98e24d707c96
|
|
BLAKE2b-256 checksum How to use checksums |
11f55e635a665616a7beda3dad461770c5abd8cfa5c461cafad989363217c34d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15
|
Release files / datacustodian-1.2.1-py2.py3-none-any.whl
| Download URL | datacustodian-1.2.1-py2.py3-none-any.whl |
|---|---|
| Size | 111.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
391117a522a6902012aec3cc98d222bc68b30db2380d0e2dd06e30c3b23ad83e
|
|
BLAKE2b-256 checksum How to use checksums |
1a6914506b258dc966713a86028e7b7070eb59df44d84b99f5f8012726a52d2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15
|