Python package anonym
Project description
anonym
- The
anonym
library is designed to anonymize sensitive data in Python, allowing users to work with, share, or publish their data without compromising privacy or violating data protection regulations. It uses Named Entity Recognition (NER) fromspacy
to identify sensitive information in the data. Once identified, the library leverages thefaker
library to generate fake but realistic replacements. Depending on the type of sensitive information (like names, addresses, dates), corresponding faker methods are used, ensuring the anonymized data maintains a similar structure and format to the original, making it suitable for further data analysis or testing.
Star this repo if you like it! ⭐️
Blog/Documentation
Contents
Installation
- Install anonym from PyPI (recommended). anonym is compatible with Python 3.6+ and runs on Linux, MacOS X and Windows.
- A new environment can be created as following:
conda create -n env_anonym python=3.10
conda activate env_anonym
pip install anonym # normal install
pip install --upgrade anonym # or update if needed
- Alternatively, you can install from the GitHub source:
# Directly install from github source
pip install -e git://gitlab.com/datainnovatielab/public/anonym.git@0.1.0#egg=master
pip install git+https://gitlab.com/datainnovatielab/public/anonym#egg=master
pip install git+https://gitlab.com/datainnovatielab/public/anonym
# By cloning
git clone https://gitlab.com/datainnovatielab/public/anonym.git
cd anonym
pip install -U .
Import anonym package
import anonym as anonym
Example:
# Example 2
# Load library
from anonym import anonym
# Initialize
model = anonym(language='english', verbose='info')
# Import example data set
df = model.import_example('titanic')
# Anonimyze the data set
df_fake = model.anonymize(df)
References
Citation
Please cite in your publications if this is useful for your research (see citation).
Contribute
- All kinds of contributions are welcome!
Licence
See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
anonym-0.1.0.tar.gz
(10.6 kB
view hashes)
Built Distribution
anonym-0.1.0-py3-none-any.whl
(9.6 kB
view hashes)