Pluggable framework for personal data compliance (LGPD/GDPR)
Project description
PrivacySchema
Pluggable framework for anonymization, consent, retention, and access to personal data (LGPD/GDPR).
Purpose
Facilitate the implementation of sensitive data compliance in different languages (Node.js, Python, JS via CDN).
Features
- Personal data validation (CPF, email, etc.)
- Data masking (CPF, email, phone, RG, CNPJ, name, address)
- Consent management (register, update, revoke)
- Retention policy (mark for expiration/removal)
- Audit logging (operations on sensitive data)
Usage examples
JavaScript/Node.js
const privacy = require('privacyschema');
// Masking examples
console.log(privacy.masking.mask('cpf', '12345678900')); // *********00
console.log(privacy.masking.mask('email', 'john.doe@example.com')); // j********e@example.com
console.log(privacy.masking.mask('phone', '11987654321')); // ********21
console.log(privacy.masking.mask('rg', '123456789')); // *******89
console.log(privacy.masking.mask('cnpj', '12345678000199')); // ************0199
console.log(privacy.masking.mask('name', 'Maria Silva')); // M***a S***a
console.log(privacy.masking.mask('address', 'Rua das Flores 123')); // R**a d**s F***s 123
Python
from privacyschema import mask
# Masking examples
print(mask('cpf', '12345678900')) # *********00
print(mask('email', 'john.doe@example.com')) # j********e@example.com
print(mask('phone', '11987654321')) # ********21
print(mask('rg', '123456789')) # *******89
print(mask('cnpj', '12345678000199')) # ************0199
print(mask('name', 'Maria Silva')) # M***a S***a
print(mask('address', 'Rua das Flores 123')) # R**a d**s F***s 123
Installation
Node.js
npm install privacyschema
Python
pip install privacyschema
CDN
<script src="https://cdn.jsdelivr.net/npm/privacyschema"></script>
Contributing
See CONTRIBUTING.md.
License
MIT
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
privacyschema-0.3.0.tar.gz
(4.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file privacyschema-0.3.0.tar.gz.
File metadata
- Download URL: privacyschema-0.3.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb7942b21edc4b85d076f94fc2ac60bf9c0bea0dea57f8bb6f70455b9495f100
|
|
| MD5 |
2049bd61ab1c021b84ef566c5c81d698
|
|
| BLAKE2b-256 |
a75758a72107d7f639d9bb908d43c105a57f351c00a602f867333d3aaa691c42
|
File details
Details for the file privacyschema-0.3.0-py3-none-any.whl.
File metadata
- Download URL: privacyschema-0.3.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a82051013e4546bc5d4108ff85215147192378f0d04211139447ea5e48d8ec9
|
|
| MD5 |
4337ae7c959d3298d5f46948c2902c3f
|
|
| BLAKE2b-256 |
e7e118a063b1bba9a3eb277f0dad769e67187fca990fb01325df63933d8fb4b0
|