Package: opendp-smartnoise-core
Deprecated!Notice: SmartNoise-Core is deprecated. Please migrate to theOpenDP library:OpenDP PyPi PackageOpenDP GitHub RepoDeprecated!SmartNoise Core Differential Privacy Library Python BindingsThis repository contains python bindings to theSmartNoise Core libraryand its underlying Rust binaries.Please see the accompanyingSmartNoise Documentation.For examples of this library in action, please see the Python notebooks in theSamples repository.In addition, see the accompanyingSmartNoise SDK repositorywhich includes tools for differential privacy.Differential privacy is the gold standard definition of privacy protection. This project aims to connect theoretical solutions from the academic community with the practical lessons learned from real-world deployments, to make differential privacy broadly accessible to future deployments. Specifically, we provide several basic building blocks that can be used by people involved with sensitive data, with implementations based on vetted and mature differential privacy research. In the Core library, we provide a pluggable open source library of differentially private algorithms and mechanisms for releasing privacy preserving queries and statistics, as well as APIs for defining an analysis and a validator for evaluating these analyses and composing the total privacy loss on a dataset.This library provides an easy-to-use interface for building analyses.Differentially private computations are specified as a protobuf analysis graph that can be validated and executed to produce differentially private releases of data.More about the SmartNoise Core Python BindingsComponent ListArchitectureInstallationBinariesFrom SourceSmartNoise Core DocumentationCommunicationReleases and ContributingMore about SmartNoise Core Python BindingsComponentsFor a full listing of the extensive set of components available in the librarysee this documentation.ArchitectureThe SmartNoise Core library system architectureis described in the parent project.
This package is an instance of the language bindings. The purpose of the language bindings is to provide a straightforward programming interface to Python for building and releasing analyses.Logic for determining if a component releases differentially private data, as well as the scaling of noise, property tracking, and accuracy estimates are handled by a native rust library called the Validator.
The actual execution of the components in the analysis is handled by a native Rust runtime.InstallationBinariesInitial Linux and OS X binaries are available onpypifor Python 3.6+:https://pypi.org/project/opendp-smartnoise-core/pip3 install opendp-smartnoise-coreThe binaries have been used on OS X and Ubuntu and are in the process of additional testing.From SourceClone the repositorygitclone--recurse-submodulesgit@github.com:opendifferentialprivacy/smartnoise-core-python.gitIf you have already cloned the repository without the submodulegitsubmoduleinit
gitsubmoduleupdateInstall the SmartNoise Core dependenciesMaccurl--proto'=https'--tlsv1.2-sSfhttps://sh.rustup.rs|sh
xcode-select--install
brewinstallprotobufpythonLinuxcurl--proto'=https'--tlsv1.2-sSfhttps://sh.rustup.rs|sh
sudoapt-getinstalldiffutilsgccmakem4python# snap for protobuf 3, because apt comes with protobuf 2sudosnapinstallprotobuf--classicWindowsInstall WSL and refer to the linux instructions.Install live-reloading developer version of packagepip3install-rrequirements/dev.txt
pip3install-e.Generate code (rerun anytime SmartNoise Core changes)
Refer totroubleshooting.mdif necessary.exportWN_DEBUG=true# optional- for faster compilation and slower executionpython3scripts/code_generation.pyBuild documentation (optional)./scripts/build_docs.shSmartNoise Core DocumentationPython library documentationCommunicationYou are very welcome to join us onGitHub Discussions!Please useGitHub Issuesfor bug reports and feature requests.For other requests, including security issues, please contact us atsmartnoise@opendp.org.Releases and ContributingPlease let us know if you encounter a bug bycreating an issue.We appreciate all contributions and welcome pull requests with bug-fixes without prior discussion.If you plan to contribute new features, utility functions or extensions to the SmartNoise Core, please first open an issue and discuss the feature with us.Sending a pull request (PR) without discussion might end up resulting in a rejected PR, because we may be taking the core in a different direction than you might be aware of.There is also acontributing guidefor new developers.