Python API for Google's Differential Privacy library
Project description
Introduction
PyDP is a Python wrapper for Google’s Differential Privacy project. The library provides a set of ε-differentially private algorithms, which can be used to produce aggregate statistics over numeric data sets containing private or sensitive information.
PyDP is part of the OpenMined community, come join the movement on Slack.
Instructions
If you’d like to contribute to this project please read these guidelines.
Usage
As part of the 0.1.1 dev release, we have added all functions required in carrots demo.
To install the package: pip install python-dp
import pydp as dp # imports the DP library # To calculate the Bounded Mean # epsilon is a number between 0 and 1 denoting privacy threshold # It measures the acceptable loss of privacy (with 0 meaning no loss is acceptable) # If both the lower and upper bounds are specified, # x = dp.BoundedMean(epsilon: double, lower: int, upper: int) x = dp.BoundedMean(0.6, 1, 10) # If lower and upper bounds are not specified, # DP library automatically calculates these bounds # x = dp.BoundedMean(epsilon: double) x = dp.BoundedMean(0.6) # To get the result # Currently supported data types are integer and float. Future versions will support additional data types # Refer to examples/carrots.py for an introduction x.result(input_data: list)
Known issue: If the privacy budget (epsilon is too less), we get a StatusOR error in the command line. While this needs to be raised as an error, right now, it’s just displayed as an error in logs.
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
Built Distributions
File details
Details for the file python_dp-0.1.4-cp38-cp38-manylinux1_x86_64.whl
.
File metadata
- Download URL: python_dp-0.1.4-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff7758c030a98df55592926a9520b42ef07049c94d1af2cda840c89d9d3123d8 |
|
MD5 | f163c1e3593dd916e13d20cbadba5e17 |
|
BLAKE2b-256 | 3a92248e117df5530e5ad5acc8365aaad7f136eeb36d3ac0994a7a8f9ba6b1bc |
File details
Details for the file python_dp-0.1.4-cp38-cp38-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: python_dp-0.1.4-cp38-cp38-macosx_10_15_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.8, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61bd462d11deb7a86d54c042f94c246f4a18e5bad8dd110fa50a94dfe4bb4dee |
|
MD5 | 913b0f2a6c460a9bc09de63e3b6eac15 |
|
BLAKE2b-256 | 2ab3d14e1f78e759e17ec3af76848e001e1e13d89f045b9fc9a74d5693725c7e |
File details
Details for the file python_dp-0.1.4-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: python_dp-0.1.4-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63178c38fba5e6c63bb85c5207a5186a38e9105126becb8879551f31cfb317a5 |
|
MD5 | 40509939a862b7242742a52e8280952e |
|
BLAKE2b-256 | f7e3f3f43e47baeb3d53a47aabde93c2496eddf964ac73e4e9d502e6ee5f8b09 |
File details
Details for the file python_dp-0.1.4-cp37-cp37m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: python_dp-0.1.4-cp37-cp37m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.7m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f91183fef9292e9495a40b8b7629143826f732f4cc51bc46e9e67b344a53b21e |
|
MD5 | 719d63b9221079398786d5eb72dfa8f0 |
|
BLAKE2b-256 | bdda5472fbc8dd5f4805ef96290a2be7723211400e3033f5524bcf8ba473abcc |
File details
Details for the file python_dp-0.1.4-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: python_dp-0.1.4-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | faddbcb059ccead0fea4be34c951ecfc669100c285504f8127ef863868308e28 |
|
MD5 | 693b11eb30c80f36b89a34e76a93f4d3 |
|
BLAKE2b-256 | 10f103d25e75b753dbda90e35ad46d2ca6f098ad0d84b7c4bed18dfef38fdbea |
File details
Details for the file python_dp-0.1.4-cp36-cp36m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: python_dp-0.1.4-cp36-cp36m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.6m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef93f09b0829b2cb7714536063cc2a448fb0e90eec6c257419b451bf3f82852a |
|
MD5 | f82aedeca15cc8236cd4f79c9c766761 |
|
BLAKE2b-256 | 5e9f16062aabebc467c1eddde13519bc10518bdc96765d67dd21ecfde1b58bb1 |
File details
Details for the file python_dp-0.1.4-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: python_dp-0.1.4-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.5.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e048ad33a6fc6e65f329e1e502840787b692605f6da20516670d6c83cec326d |
|
MD5 | 07ce6129c4c63715967b2294c2eeaa46 |
|
BLAKE2b-256 | 7d63632ccb91494a0ee6cedbe4c034d64d633b121b76fe09fd6e7c4022114cf5 |
File details
Details for the file python_dp-0.1.4-cp35-cp35m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: python_dp-0.1.4-cp35-cp35m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.5m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.5.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2d96cd49d1c26bf7c2ec99ae7eedd495f09385e57637089663fc19c0d4f1ea3 |
|
MD5 | adaf84f5a7005879c450cf65f4235f27 |
|
BLAKE2b-256 | c821bb29e3f30d9ff2912bb66e193627820507ce0f7e41f8bafaa97b4df165e6 |