Skip to main content

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
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}

Metadata

Release files for strmprivacy-diagnostics 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for strmprivacy-diagnostics 1.2.2
File Size Uploaded Provenance Actions
strmprivacy-diagnostics-1.2.2.tar.gz 8.5 kB Without provenance Details for strmprivacy-diagnostics-1.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for strmprivacy-diagnostics 1.2.2
File Interpreter ABI Platform Actions
strmprivacy_diagnostics-1.2.2-py3-none-any.whl Python 3 none any Details for strmprivacy_diagnostics-1.2.2-py3-none-any.whl

Total release size: 17.5 kB

Release files / strmprivacy-diagnostics-1.2.2.tar.gz

Download URL strmprivacy-diagnostics-1.2.2.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
548a6896288ffc6e232cbb72b14d1808d45f55d491206cc5f96576501f5e091f
BLAKE2b-256 checksum
How to use checksums
6464d4e5add793c085d29a7e3570d7f6fca16c8073894c852b90e849796e5f7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / strmprivacy_diagnostics-1.2.2-py3-none-any.whl

Download URL strmprivacy_diagnostics-1.2.2-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6251800ba6282cfe5a0f6e662fe4066fa58b95ed24815e9ac012817a9b46a415
BLAKE2b-256 checksum
How to use checksums
d517ee256caeb2c96cafe40cb1240f490beecb6090e2d99059b7121ad091577f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for strmprivacy-diagnostics 1.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page