Logo Lanfrica

kingztech2019/guardrails-african-compliance

Domaine:

digital infrastructure

Type de record:

softwaretools
Créateur:
kin
Hôte:
Guardrails AI validator for African financial and data protection compliance — NDPA 2023, POPIA, KDPA, CBN AML/CFT thresholds, cross-border transfer controls # guardrails-african-compliance **Guardrails AI validator for African financial and data protection compliance.** Validates LLM outputs against African regulatory frameworks — detecting special-category data, AML/CFT transaction thresholds, and prohibited cross-border data transfers. --- ## What it checks ### 1. Sensitive data (`sensitive_data`) Flags special-category data keywords under African data protection laws: | Framework | Jurisdiction | Special categories | |---|---|---| | NDPA 2023 | Nigeria | Health, biometric, genetic, religious, political, children's data | | POPIA | South Africa | Above + criminal records | | KDPA 2019 | Kenya | Above + ethnic origin, race | | GH_DPA 2012 | Ghana | Same as NDPA base | | RW_DPA 2021 | Rwanda | Same as NDPA base | ### 2. CBN transaction thresholds (`cbn_threshold`) Flags Nigerian Naira (NGN / ₦) amounts in LLM output: | Amount | Rule | |---|---| | ≥ ₦5,000,000 | Structuring risk — compliance officer review required | | ≥ ₦10,000,000 | Mandatory Currency Transaction Report (CBN AML/CFT/CPF 2023) | ### 3. CBK transaction thresholds (`cbk_threshold`) Flags Kenyan Shilling (KES / KSh) amounts: | Amount | Rule | |---|---| | ≥ KES 1,000,000 | Suspicious transaction — enhanced due diligence | | ≥ KES 5,000,000 | Mandatory CTR (CBK AML/CFT Guidelines) | ### 4. Cross-border data transfers (`cross_border`) Flags data transfer language directed at countries without NDPA 2023 §43 adequacy determination (China, Russia, Iran, North Korea, Belarus, Myanmar, Cuba, Syria). --- ## Installation ```bash guardrails hub install hub://guardrails/african_compliance ``` Or install directly: ```bash pip install guardrails-african-compliance ``` --- ## Usage ```python from guardrails import Guard from guardrails.hub import AfricanCompliance # Run all checks guard = Guard().use(AfricanCompliance, on_fail="exception") # CBN threshold guard.validate("Transfer of NGN 10,000,000 approved.") # → raises ValidationError: [CBN] Amou …