strmprivacy-diagnostics


Namestrmprivacy-diagnostics JSON
Version 1.2.2 PyPI version JSON
download
home_page
SummarySTRM Privacy Diagnostics for reporting privacy metrics on a dataset.
upload_time2023-01-25 15:02:46
maintainer
docs_urlNone
authorStream Machine B.V.
requires_python>=3.6
license
keywords strmprivacy privacy diagnostics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # STRM Privacy Diagnostics


This package contains diagnostics for your data, by means of computing k-Anonymity, l-Diversity and t-Closeness.

You can compute the scores by passing your data and indicating which columns are quasi-identifiers and sensitive attributes. 

A 'quasi identifier' is a data attribute on an individual that together with other attributes could identify them. E.g. your length probably doesn't discern you from a larger group of people, but the combination of your length, age and city of birth will if someone has some knowledge about you.

A 'sensitive attribute' is a sensitive data point, like a specific medical diagnosis or credit score.  

## Installation
Install the package via Pip:

```
pip install strmprivacy-diagnostics
```

## Usage
Simply import the package and
* point it to your input data
* calculate the statistics by passing the quasi identifiers and sensitive attributes
* print a report by passing the quasi identifiers and sensitive attributes

```python
from strmprivacy.diagnostics import PrivacyDiagnostics

# create an instance of the diagnostics class
d = PrivacyDiagnostics("/path/to/csv")

# calculate the statistics
d.calculate_stats(
    qi=['qi1', 'qi2', ...],  # names of quasi identifier columns,
    sa=['sa1', 'sa2', ...],  # names of sensitive attributes
)

# create report
d.create_report(
    qi=['qi1', 'qi2', ...],  # names of quasi identifier columns,
    sa=['sa1', 'sa2', ...],  # names of sensitive attributes
)

d.stats
>>> {'k': xxx, 'l': {'col1': xxx, ...}, 't': xxx}
```



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "strmprivacy-diagnostics",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "strmprivacy privacy diagnostics",
    "author": "Stream Machine B.V.",
    "author_email": "apis@strmprivacy.io",
    "download_url": "https://files.pythonhosted.org/packages/64/64/d4e5add793c085d29a7e3570d7f6fca16c8073894c852b90e849796e5f7a/strmprivacy-diagnostics-1.2.2.tar.gz",
    "platform": null,
    "description": "# STRM Privacy Diagnostics\n\n\nThis package contains diagnostics for your data, by means of computing k-Anonymity, l-Diversity and t-Closeness.\n\nYou can compute the scores by passing your data and indicating which columns are quasi-identifiers and sensitive attributes. \n\nA 'quasi identifier' is a data attribute on an individual that together with other attributes could identify them. E.g. your length probably doesn't discern you from a larger group of people, but the combination of your length, age and city of birth will if someone has some knowledge about you.\n\nA 'sensitive attribute' is a sensitive data point, like a specific medical diagnosis or credit score.  \n\n## Installation\nInstall the package via Pip:\n\n```\npip install strmprivacy-diagnostics\n```\n\n## Usage\nSimply import the package and\n* point it to your input data\n* calculate the statistics by passing the quasi identifiers and sensitive attributes\n* print a report by passing the quasi identifiers and sensitive attributes\n\n```python\nfrom strmprivacy.diagnostics import PrivacyDiagnostics\n\n# create an instance of the diagnostics class\nd = PrivacyDiagnostics(\"/path/to/csv\")\n\n# calculate the statistics\nd.calculate_stats(\n    qi=['qi1', 'qi2', ...],  # names of quasi identifier columns,\n    sa=['sa1', 'sa2', ...],  # names of sensitive attributes\n)\n\n# create report\nd.create_report(\n    qi=['qi1', 'qi2', ...],  # names of quasi identifier columns,\n    sa=['sa1', 'sa2', ...],  # names of sensitive attributes\n)\n\nd.stats\n>>> {'k': xxx, 'l': {'col1': xxx, ...}, 't': xxx}\n```\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "STRM Privacy Diagnostics for reporting privacy metrics on a dataset.",
    "version": "1.2.2",
    "split_keywords": [
        "strmprivacy",
        "privacy",
        "diagnostics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d517ee256caeb2c96cafe40cb1240f490beecb6090e2d99059b7121ad091577f",
                "md5": "e54ceddd4edb21f091715765d97dfec2",
                "sha256": "6251800ba6282cfe5a0f6e662fe4066fa58b95ed24815e9ac012817a9b46a415"
            },
            "downloads": -1,
            "filename": "strmprivacy_diagnostics-1.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e54ceddd4edb21f091715765d97dfec2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 8992,
            "upload_time": "2023-01-25T15:02:45",
            "upload_time_iso_8601": "2023-01-25T15:02:45.477153Z",
            "url": "https://files.pythonhosted.org/packages/d5/17/ee256caeb2c96cafe40cb1240f490beecb6090e2d99059b7121ad091577f/strmprivacy_diagnostics-1.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6464d4e5add793c085d29a7e3570d7f6fca16c8073894c852b90e849796e5f7a",
                "md5": "e043bc3fb36e36e9dd9330cd211b9b33",
                "sha256": "548a6896288ffc6e232cbb72b14d1808d45f55d491206cc5f96576501f5e091f"
            },
            "downloads": -1,
            "filename": "strmprivacy-diagnostics-1.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e043bc3fb36e36e9dd9330cd211b9b33",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 8525,
            "upload_time": "2023-01-25T15:02:46",
            "upload_time_iso_8601": "2023-01-25T15:02:46.572922Z",
            "url": "https://files.pythonhosted.org/packages/64/64/d4e5add793c085d29a7e3570d7f6fca16c8073894c852b90e849796e5f7a/strmprivacy-diagnostics-1.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-25 15:02:46",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "strmprivacy-diagnostics"
}
        
Elapsed time: 0.03165s