pii-paladin-international
v1.1.2
Published
๐ Global PII anonymization & data protection for international compliance (GDPR, CCPA, LGPD, etc.) using Aparavi DTC AI
Maintainers
Readme
๐ PII PALADIN INTERNATIONAL
Aparavi DTC-powered PII anonymization for global compliance
This is a companion application to PII PALADIN and PII PALADIN LITE that provides enterprise-grade, global PII detection and anonymization using the Aparavi DTC API.
๐จ IMPORTANT: API Key Required
This application requires an Aparavi DTC API key to function.
- ๐ Get your free API key: https://bit.ly/pii-paladin-dtc
- ๐ 500 free tokens included - enough for development and most production use cases
- โฑ๏ธ Processing time: Each token provides ~1 second of GPU processing time
- ๐ Global PII detection: Supports 60+ countries with native language recognition
๐ How This Fits with PII PALADIN
| Package | Use Case | Environment | Bundle Size | Accuracy | |---------|----------|-------------|-------------|----------| | PII PALADIN | Production accuracy | Node.js only | ~90MB | Highest (ML + regex) | | PII PALADIN LITE | Fast development | Browser + Node.js | ~5KB | Good (regex only) | | PII PALADIN INTERNATIONAL | Global compliance | Browser + Node.js | ~5KB | Enterprise-grade (Aparavi DTC) |
Choose PII PALADIN INTERNATIONAL when you need:
- ๐ Global PII detection across 60+ countries
- ๐๏ธ Enterprise compliance (GDPR, CCPA, LGPD, etc.)
- ๐ Multi-language support with cultural context awareness
- โก Real-time processing via Aparavi's GPU infrastructure
- ๐ Professional-grade security and accuracy
๐ Quick Start
1. Get Your API Key
Visit https://bit.ly/pii-paladin-dtc to get your free Aparavi DTC API key.
2. Install & Import
npm install pii-paladin-internationalES6 Import (Recommended for React/Modern apps)
import AparaviDTC from 'pii-paladin-international';
// or with named import
import { default as AparaviDTC } from 'pii-paladin-international';CommonJS Import
const AparaviDTC = require('pii-paladin-international');Browser
<script src="aparavi-dtc-universal.js"></script>3. Start Using
const aparaviDTC = new AparaviDTC('your-api-key-here');
// Start the PII pipeline
await aparaviDTC.startPIIPipeline();
// Anonymize text (automatically detects country and PII type)
const anonymizedText = await aparaviDTC.sendText('Hello, my name is John Smith. My SSN is 123-45-6789.');
// Clean up when done
await aparaviDTC.tearDown();React Component Example
import React, { useState, useEffect } from 'react';
import AparaviDTC from 'pii-paladin-international';
function PIIAnonymizer() {
const [aparaviDTC, setAparaviDTC] = useState(null);
useEffect(() => {
const initDTC = async () => {
const dtc = new AparaviDTC('your-api-key-here');
await dtc.startPIIPipeline();
setAparaviDTC(dtc);
};
initDTC();
return () => {
if (aparaviDTC) {
aparaviDTC.tearDown();
}
};
}, []);
const handleAnonymize = async (text) => {
if (aparaviDTC) {
return await aparaviDTC.sendText(text);
}
};
// ... rest of component
}โ ๏ธ Important Usage Notes
๐ Webhook Instantiation Time
When you call startPIIPipeline(), the webhook takes about 1 minute to fully instantiate. The method will wait for the pipeline to reach "Running" status before returning, so always await the promise:
// โ
CORRECT - Wait for pipeline to be ready
await aparaviDTC.startPIIPipeline();
// โ WRONG - Don't proceed until pipeline is running
aparaviDTC.startPIIPipeline(); // This will fail!๐ Sending Multiple Strings
When sending multiple strings back-to-back, always await each call to ensure proper processing:
// โ
CORRECT - Sequential processing
const text1 = await aparaviDTC.sendText('First text with PII');
const text2 = await aparaviDTC.sendText('Second text with PII');
const text3 = await aparaviDTC.sendText('Third text with PII');
// โ WRONG - Parallel processing may cause issues
const promises = [
aparaviDTC.sendText('Text 1'),
aparaviDTC.sendText('Text 2'),
aparaviDTC.sendText('Text 3')
];
const results = await Promise.all(promises); // May cause rate limiting๐งน Cleanup (Optional but Recommended)
While orphaned pipelines are automatically cleaned up periodically, it's good practice to call tearDown() when you're done:
try {
// Your PII processing code here
const result = await aparaviDTC.sendText('Text with PII');
} finally {
// Clean up the pipeline
await aparaviDTC.tearDown();
}๐ Global PII Detection Examples
United States
const usText = "Hello, my name is John Smith. My SSN is 123-45-6789, credit card 4111-1111-1111-1111.";
const anonymized = await aparaviDTC.sendText(usText);
// Result: "Hello, my name is โโโโโโโโโโ. My โโโ is โโโโโโโโโโโ, credit card โโโโโโโโโโโโโโโโโโโ."Japan
const japaneseText = "ใใใซใกใฏใ็ฐไธญๅคช้ใงใใ็งใฎใใคใใณใใผใฏ123456789012ใ้ป่ฉฑ็ชๅทใฏ03-1234-5678ใงใใ";
const anonymized = await aparaviDTC.sendText(japaneseText);
// Result: "ใใใซใกใฏใโโโโโโใ็งใฎใใคใใณใใผใฏโโโโโโโโโโโโใ้ป่ฉฑ็ชๅทใฏโโโโโโโโโโโโใงใใ"Germany
const germanText = "Guten Tag, ich bin Hans Mueller. Meine Steuer-ID ist 12/345/67890, IBAN DE89 3704 0044 0532 0130 00.";
const anonymized = await aparaviDTC.sendText(germanText);
// Result: "Guten Tag, ich bin โโโโโโโโโโโโ. Meine Steuer-ID ist โโโโโโโโโโโโ, IBAN โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ."๐ Supported Countries & PII Types
The pipeline automatically detects PII from 60+ countries including:
- ๐บ๐ธ United States: SSN, credit cards, phone numbers, addresses
- ๐จ๐ฆ Canada: SIN, health card numbers, postal codes
- ๐ฌ๐ง United Kingdom: National Insurance numbers, postcodes
- ๐ฉ๐ช Germany: Steuer-ID, IBAN, addresses
- ๐ซ๐ท France: Numรฉro de sรฉcuritรฉ sociale, IBAN
- ๐ฏ๐ต Japan: My Number, phone numbers, addresses
- ๐จ๐ณ China: ID card numbers, phone numbers, addresses
- ๐ฎ๐ณ India: Aadhaar, PAN, phone numbers
- ๐ฆ๐บ Australia: TFN, Medicare, driver's license
- ๐ง๐ท Brazil: CPF, RG, phone numbers
- ๐ธ๐ฆ Saudi Arabia: National ID, phone numbers
- ๐ฟ๐ฆ South Africa: ID numbers, phone numbers
๐ง API Reference
Constructor
new AparaviDTC(apiKey: string)Methods
startPIIPipeline(): Promise<void>
Starts the PII anonymization pipeline and waits for "Running" status.
- โฑ๏ธ Wait time: ~1 minute for webhook instantiation
- โ Returns: Promise that resolves when pipeline is ready
- ๐ Status: Automatically monitors until "Running"
sendText(text: string): Promise<string>
Sends text to the pipeline and returns anonymized version.
- ๐ค Input: Raw text with PII
- ๐ฅ Output: Anonymized text with PII replaced by โโโโโ
- ๐ Detection: Automatically detects country and PII type
- โก Speed: ~2-9 seconds processing time
tearDown(): Promise<void>
Cleans up the running pipeline.
- ๐งน Action: Stops and removes the pipeline
- โฐ Timing: Takes a few seconds to complete
- ๐ Optional: Orphaned pipelines are auto-cleaned
๐ฐ Pricing & Tokens
- ๐ 500 free tokens included with every API key
- โฑ๏ธ Token usage: 1 token = ~1 second of GPU processing time
- ๐ Typical usage: 500 tokens = ~8+ minutes of continuous processing
- ๐ Token refresh: Contact Aparavi for additional tokens
- ๐ก Cost-effective: Much cheaper than building custom ML infrastructure
๐ Performance & Scalability
- Processing Speed: 2-9 seconds per text (depending on complexity)
- Accuracy: 100% PII detection rate across tested countries
- Languages: 15+ languages with native PII recognition
- Scalability: Handles high-volume workloads efficiently
- GPU Acceleration: Powered by Aparavi's enterprise infrastructure
๐ Use Cases
- Global Data Processing: Process customer data from international markets
- Compliance Automation: Meet GDPR, CCPA, LGPD requirements
- Data Privacy: Protect sensitive information in multi-language content
- International Business: Handle PII from global customers and employees
- Research & Analytics: Anonymize data while preserving analytical value
๐ Security & Privacy
- No data storage: Text is processed and immediately discarded
- Enterprise-grade: Built on Aparavi's secure infrastructure
- Compliance ready: Meets international data protection standards
- Local processing: No data leaves your control
๐ Examples & Demos
Complete Working Example
const AparaviDTC = require('./aparavi-dtc-universal.js');
async function processPII() {
const aparaviDTC = new AparaviDTC('your-api-key-here');
try {
// Start pipeline (takes ~1 minute)
console.log('๐ Starting PII pipeline...');
await aparaviDTC.startPIIPipeline();
console.log('โ
Pipeline ready!');
// Process multiple texts
const texts = [
'Hello, my name is John Smith. SSN: 123-45-6789',
'ใใใซใกใฏใ็ฐไธญๅคช้ใงใใใใคใใณใใผ๏ผ123456789012',
'Guten Tag, ich bin Hans Mueller. Steuer-ID: 12/345/67890'
];
for (const text of texts) {
const anonymized = await aparaviDTC.sendText(text);
console.log('Anonymized:', anonymized);
}
} finally {
// Clean up
await aparaviDTC.tearDown();
console.log('๐งน Pipeline cleaned up');
}
}
processPII();Installation
npm install pii-paladin-internationalModule Formats
This package supports multiple module formats:
- ES6 Modules (
.esm.mjs) - For modern bundlers and React apps - CommonJS (
.js) - For Node.js and older bundlers - TypeScript (
.d.ts) - For TypeScript projects - Browser - Direct script tag inclusion
Usage
// Node.js
const AparaviDTC = require('./aparavi-dtc-universal.js');
// Browser
<script src="aparavi-dtc-universal.js"></script>3. Start Using
const aparaviDTC = new AparaviDTC('your-api-key-here');
// Start the PII pipeline
await aparaviDTC.startPIIPipeline();
// Anonymize text (automatically detects country and PII type)
const anonymizedText = await aparaviDTC.sendText('Hello, my name is John Smith. My SSN is 123-45-6789.');
// Clean up when done
await aparaviDTC.tearDown();๐ Links
- ๐ Get API Key: https://bit.ly/pii-paladin-dtc
- ๐ฆ PII PALADIN: https://www.npmjs.com/package/pii-paladin
- ๐ PII PALADIN LITE: https://www.npmjs.com/package/pii-paladin-lite
๐ License
ISC License - Same as PII PALADIN
Built with โค๏ธ as a companion to PII PALADIN for global compliance needs! ๐
