AaaS Python wrapper


Keywords
anonymization ARX ARXaaS ARX-as-a-Service, anonymization, python3, wrapper
License
MIT
Install
pip install PyAaaS==0.3.8

Documentation

Build Status Maintainability Test Coverage Documentation Status License: MIT

PyARXaaS

Python Package for interfacing with ARXaaS in Python

Read more about PyARXaaS at: https://pyaaas.readthedocs.io/

Getting Started

Installation

pip install pyarxaas

Basic Usage

   # import dependencies
   from pyarxaas import ARXaaS
   from pyarxaas.privacy_models import KAnonymity
   from pyarxaas import AttributeType
   from pyarxaas import Dataset
   import pandas as pd

   arxaas = ARXaaS(url) # url contains url to AaaS web service

   df = pd.read_csv("data.csv")

   # create Dataset
   dataset = Dataset.from_pandas(df)


   # set attribute type
   dataset.set_attributes(AttributeType.QUASIIDENTIFYING, 'name', 'gender')
   dataset.set_attribute(AttributeType.IDENTIFYING, 'id')

   # get the risk profle of the dataset
   risk_profile = arxaas.risk_profile(dataset)

   # get risk metrics
   re_indentifiation_risk = risk_profile.re_identification_risk
   distribution_of_risk = risk_profile.distribution_of_risk