smartnoise-core-python


Namesmartnoise-core-python JSON
Version 0.2.4 PyPI version JSON
download
home_pagehttps://github.com/opendp/smartnoise-core-python
SummaryDeprecated. Please use the OpenDP library: https://github.com/opendp/opendp
upload_time2023-03-13 17:26:27
maintainer
docs_urlNone
authorConsequences of Data
requires_python>=3.6
license
keywords differential-privacy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Deprecated!
## **Notice**: SmartNoise-Core is deprecated. Please migrate to the [OpenDP library](https://github.com/opendp/opendp/):
- [OpenDP PyPi Package](https://pypi.org/project/opendp/)
- [OpenDP GitHub Repo](https://github.com/opendp/opendp/)

----------------------------------------------------
# Deprecated!

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8-blue)](https://www.python.org/)

<a href="https://opendp.org/"><img src="https://raw.githubusercontent.com/opendifferentialprivacy/smartnoise-core/1b196bb1e375a9686ad6d44269036cf78a39fdf2/images/SmartNoise_Logos/SVG/LogoMark_color.svg" align="left" height="65" vspace="8" hspace="18"></a>

## SmartNoise Core Differential Privacy Library Python Bindings 
\
\
This repository contains python bindings to the [SmartNoise Core library](https://github.com/opendifferentialprivacy/smartnoise-core) and its underlying Rust binaries.

- Please see the accompanying [SmartNoise Documentation](https://docs.smartnoise.org).
- For examples of this library in action, please see the Python notebooks in the [Samples repository](https://github.com/opendifferentialprivacy/smartnoise-samples).
- In addition, see the accompanying [SmartNoise SDK repository](https://github.com/opendifferentialprivacy/smartnoise-sdk) which 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 Bindings](#more-about-smartnoise-core-python-bindings)
  - [Component List](#components)
  - [Architecture](#architecture)
- [Installation](#installation)
  - [Binaries](#binaries)
  - [From Source](#from-source)
- [SmartNoise Core Documentation](#smartnoise-core-documentation)
- [Communication](#communication)
- [Releases and Contributing](#releases-and-contributing)

---

## More about SmartNoise Core Python Bindings

### Components

For a full listing of the extensive set of components available in the library [see this documentation.](https://opendp.github.io/smartnoise-core/doc/smartnoise_validator/docs/components/index.html)

### Architecture

The SmartNoise Core library system architecture [is described in the parent project](https://github.com/opendp/smartnoise-core#Architecture).
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.


## Installation

### Binaries

Initial Linux and OS X binaries are available on [pypi](https://pypi.org/project/opendp-smartnoise-core/) for Python 3.6+:
  - https://pypi.org/project/opendp-smartnoise-core/
  - ```pip3 install opendp-smartnoise-core```

The binaries have been used on OS X and Ubuntu and are in the process of additional testing.

### From Source

1. Clone the repository
    ```shell script
    git clone --recurse-submodules git@github.com:opendifferentialprivacy/smartnoise-core-python.git
    ```

    If you have already cloned the repository without the submodule
    ```shell script
    git submodule init
    git submodule update
    ```

2. Install the SmartNoise Core dependencies

    **Mac**
    ```shell script
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    xcode-select --install
    brew install protobuf python
    ```

    **Linux**
    ```shell script
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    sudo apt-get install diffutils gcc make m4 python
    # snap for protobuf 3, because apt comes with protobuf 2
    sudo snap install protobuf --classic
    ```

    **Windows**

    Install WSL and refer to the linux instructions.

3. Install live-reloading developer version of package
   ```shell script
   pip3 install -r requirements/dev.txt
   pip3 install -e .
   ```

4. Generate code (rerun anytime SmartNoise Core changes)
    Refer to [troubleshooting.md](https://github.com/opendp/smartnoise-core/blob/develop/troubleshooting.md) if necessary.
    ```shell script
    export WN_DEBUG=true # optional- for faster compilation and slower execution
    python3 scripts/code_generation.py
    ```

5. Build documentation (optional)
    ```shell script
    ./scripts/build_docs.sh
    ```

### SmartNoise Core Documentation

- [Python library documentation](https://old-docs.smartnoise.org/)


## Communication

- You are very welcome to join us on [GitHub Discussions](https://github.com/opendp/opendp/discussions/categories/smartnoise)!
- Please use [GitHub Issues](https://github.com/opendp/smartnoise-core-python/issues) for bug reports and feature requests.
- For other requests, including security issues, please contact us at [smartnoise@opendp.org](mailto:smartnoise@opendp.org).

## Releases and Contributing

Please let us know if you encounter a bug by [creating an issue](https://github.com/opendp/smartnoise-core-python/issues).

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 a [contributing guide](contributing.md) for new developers. 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/opendp/smartnoise-core-python",
    "name": "smartnoise-core-python",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "differential-privacy",
    "author": "Consequences of Data",
    "author_email": "info@opendp.org",
    "download_url": "https://files.pythonhosted.org/packages/0e/bd/98ffcdbff8b4a932caa0c11962f7bfccebae991c382ce019e295d8fab8b1/smartnoise-core-python-0.2.4.tar.gz",
    "platform": "any",
    "description": "# Deprecated!\n## **Notice**: SmartNoise-Core is deprecated. Please migrate to the [OpenDP library](https://github.com/opendp/opendp/):\n- [OpenDP PyPi Package](https://pypi.org/project/opendp/)\n- [OpenDP GitHub Repo](https://github.com/opendp/opendp/)\n\n----------------------------------------------------\n# Deprecated!\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8-blue)](https://www.python.org/)\n\n<a href=\"https://opendp.org/\"><img src=\"https://raw.githubusercontent.com/opendifferentialprivacy/smartnoise-core/1b196bb1e375a9686ad6d44269036cf78a39fdf2/images/SmartNoise_Logos/SVG/LogoMark_color.svg\" align=\"left\" height=\"65\" vspace=\"8\" hspace=\"18\"></a>\n\n## SmartNoise Core Differential Privacy Library Python Bindings \n\\\n\\\nThis repository contains python bindings to the [SmartNoise Core library](https://github.com/opendifferentialprivacy/smartnoise-core) and its underlying Rust binaries.\n\n- Please see the accompanying [SmartNoise Documentation](https://docs.smartnoise.org).\n- For examples of this library in action, please see the Python notebooks in the [Samples repository](https://github.com/opendifferentialprivacy/smartnoise-samples).\n- In addition, see the accompanying [SmartNoise SDK repository](https://github.com/opendifferentialprivacy/smartnoise-sdk) which includes tools for differential privacy.\n\n---\n\nDifferential 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.\n\nThis library provides an easy-to-use interface for building analyses.\n\nDifferentially private computations are specified as a protobuf analysis graph that can be validated and executed to produce differentially private releases of data.\n\n\n- [More about the SmartNoise Core Python Bindings](#more-about-smartnoise-core-python-bindings)\n  - [Component List](#components)\n  - [Architecture](#architecture)\n- [Installation](#installation)\n  - [Binaries](#binaries)\n  - [From Source](#from-source)\n- [SmartNoise Core Documentation](#smartnoise-core-documentation)\n- [Communication](#communication)\n- [Releases and Contributing](#releases-and-contributing)\n\n---\n\n## More about SmartNoise Core Python Bindings\n\n### Components\n\nFor a full listing of the extensive set of components available in the library [see this documentation.](https://opendp.github.io/smartnoise-core/doc/smartnoise_validator/docs/components/index.html)\n\n### Architecture\n\nThe SmartNoise Core library system architecture [is described in the parent project](https://github.com/opendp/smartnoise-core#Architecture).\nThis 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.\n\nLogic 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.\nThe actual execution of the components in the analysis is handled by a native Rust runtime.\n\n\n## Installation\n\n### Binaries\n\nInitial Linux and OS X binaries are available on [pypi](https://pypi.org/project/opendp-smartnoise-core/) for Python 3.6+:\n  - https://pypi.org/project/opendp-smartnoise-core/\n  - ```pip3 install opendp-smartnoise-core```\n\nThe binaries have been used on OS X and Ubuntu and are in the process of additional testing.\n\n### From Source\n\n1. Clone the repository\n    ```shell script\n    git clone --recurse-submodules git@github.com:opendifferentialprivacy/smartnoise-core-python.git\n    ```\n\n    If you have already cloned the repository without the submodule\n    ```shell script\n    git submodule init\n    git submodule update\n    ```\n\n2. Install the SmartNoise Core dependencies\n\n    **Mac**\n    ```shell script\n    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n    xcode-select --install\n    brew install protobuf python\n    ```\n\n    **Linux**\n    ```shell script\n    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n    sudo apt-get install diffutils gcc make m4 python\n    # snap for protobuf 3, because apt comes with protobuf 2\n    sudo snap install protobuf --classic\n    ```\n\n    **Windows**\n\n    Install WSL and refer to the linux instructions.\n\n3. Install live-reloading developer version of package\n   ```shell script\n   pip3 install -r requirements/dev.txt\n   pip3 install -e .\n   ```\n\n4. Generate code (rerun anytime SmartNoise Core changes)\n    Refer to [troubleshooting.md](https://github.com/opendp/smartnoise-core/blob/develop/troubleshooting.md) if necessary.\n    ```shell script\n    export WN_DEBUG=true # optional- for faster compilation and slower execution\n    python3 scripts/code_generation.py\n    ```\n\n5. Build documentation (optional)\n    ```shell script\n    ./scripts/build_docs.sh\n    ```\n\n### SmartNoise Core Documentation\n\n- [Python library documentation](https://old-docs.smartnoise.org/)\n\n\n## Communication\n\n- You are very welcome to join us on [GitHub Discussions](https://github.com/opendp/opendp/discussions/categories/smartnoise)!\n- Please use [GitHub Issues](https://github.com/opendp/smartnoise-core-python/issues) for bug reports and feature requests.\n- For other requests, including security issues, please contact us at [smartnoise@opendp.org](mailto:smartnoise@opendp.org).\n\n## Releases and Contributing\n\nPlease let us know if you encounter a bug by [creating an issue](https://github.com/opendp/smartnoise-core-python/issues).\n\nWe appreciate all contributions and welcome pull requests with bug-fixes without prior discussion.\n\nIf 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.\n  - 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.\n\nThere is also a [contributing guide](contributing.md) for new developers. \n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Deprecated. Please use the OpenDP library: https://github.com/opendp/opendp",
    "version": "0.2.4",
    "split_keywords": [
        "differential-privacy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fd98ea05f1d6bb2e71be999062f6af5f18cd5ad91132adc5f4b651df4c21c27a",
                "md5": "f7f63e269ac1e0631ebb6cd5fa4d83d3",
                "sha256": "08534e0b89338892c15461318d8fd7288d7964793b42597b36a71d0931481da9"
            },
            "downloads": -1,
            "filename": "smartnoise_core_python-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f7f63e269ac1e0631ebb6cd5fa4d83d3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 56113,
            "upload_time": "2023-03-13T17:26:24",
            "upload_time_iso_8601": "2023-03-13T17:26:24.859974Z",
            "url": "https://files.pythonhosted.org/packages/fd/98/ea05f1d6bb2e71be999062f6af5f18cd5ad91132adc5f4b651df4c21c27a/smartnoise_core_python-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ebd98ffcdbff8b4a932caa0c11962f7bfccebae991c382ce019e295d8fab8b1",
                "md5": "e9bbcc049d5aa42f393ea593588dacd7",
                "sha256": "daa5fdd323bda59f214a8bbfb8284693a2472ad520d1c9d3c24676310cadc53e"
            },
            "downloads": -1,
            "filename": "smartnoise-core-python-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "e9bbcc049d5aa42f393ea593588dacd7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 68160,
            "upload_time": "2023-03-13T17:26:27",
            "upload_time_iso_8601": "2023-03-13T17:26:27.065619Z",
            "url": "https://files.pythonhosted.org/packages/0e/bd/98ffcdbff8b4a932caa0c11962f7bfccebae991c382ce019e295d8fab8b1/smartnoise-core-python-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-13 17:26:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "opendp",
    "github_project": "smartnoise-core-python",
    "lcname": "smartnoise-core-python"
}
        
Elapsed time: 0.04410s