Skip to main content

A simple library for anonymizing sensitive words

Project description

Anonymizer Lib

A Python library to mask sensitive words and values using configurable JSON.

🚀 Installation & First Use

1. Uninstall old version if exists

pip uninstall -y anonymizer_lib

2. Install your local package

pip install anonymizer-lib

3. Trigger JSON creation (runs once per project root)

python -m anonymizer_lib

This will create a critical_words.json in your project root. You can then update this JSON with your mappings and groups.

⚠️ Important Notes

Do not rename the top-level keys mapping or groups.

Inside groups, the key must always be "items".

These keywords are reserved and required by the library to function correctly.

📝 Sections Explained mapping

Use this for direct word-to-placeholder replacements.

"mapping": { "<Original_Name>": "<Mask_Name>", "DatabasePassword": "" }

groups

Use this when you have multiple values under one category (like servers, IPs, emails, etc.). Every item in a category will be replaced by the same placeholder.

Example:

"servers": { "items": [ "Server1", "Server2", "Server3" ], "placeholder": "" }

Adding More Categories

You can add as many categories as you need. Follow the pattern below:

"Category3": { "items": [ "ExampleValue1", "ExampleValue2" ], "placeholder": "" }, "Category4": { "items": [ "AnotherValue1", "AnotherValue2" ], "placeholder": "" }

✅ Example Usage

Example JSON

{ "mapping": { "Password123": "" }, "groups": { "ips": { "items": ["127.0.0.1", "10.0.0.1"], "placeholder": "" } } }

Input Sentence

The system uses Password123 on 127.0.0.1

Output Sentence

The system uses on

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anonymizer_lib-0.1.3.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anonymizer_lib-0.1.3-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file anonymizer_lib-0.1.3.tar.gz.

File metadata

  • Download URL: anonymizer_lib-0.1.3.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for anonymizer_lib-0.1.3.tar.gz
Algorithm Hash digest
SHA256 beff0857608c17770419fe1f92c48fae1e5097cfd210688ea4505fa66e5f79e9
MD5 6219a373ab39f3a1fe21aa084146aea0
BLAKE2b-256 25c72a02267ffc9f874441187e1f2503ce77c2c9db23fd2cf574b3406913e3a1

See more details on using hashes here.

File details

Details for the file anonymizer_lib-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: anonymizer_lib-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for anonymizer_lib-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 285b0284d61f51677db10ce4bad8e03bd8a53d5eee16be7640aed2301829f5b3
MD5 e26455aa5b06ce44d91b64ad197ed0f1
BLAKE2b-256 5b83b16bdf13df079f730ae563ddddf369d18b5db15fa57d2827819fd5399342

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page