Gen.IA.L CAPA Python SDK 🛡️
SDK cliente oficial para integrar el motor de gobernanza de privacidad y cumplimiento normativo (Ley 21.719 - Chile) de Gen.IA.L CAPA en tus aplicaciones, CRMs y agentes de Inteligencia Artificial.
📦 Instalación
uv add genial-capa
# o con pip
pip install genial-capa
🚀 Uso Rápido
1. Cliente Asíncrono (AsyncCapaClient)
import asyncio
from genial_capa import AsyncCapaClient
async def main():
async with AsyncCapaClient(api_key="sk_capa_tu_api_key_aqui") as capa:
decision = await capa.evaluate(
text="El paciente Juan Pérez, RUT 12.345.678-5, presenta hipertensión.",
destination="ExternalLLM",
operation="PROMPT_ANALYSIS",
)
print("Veredicto:", decision.verdict) # ALLOW, MASK, DENY
print("Texto seguro:", decision.sanitized_text)
asyncio.run(main())
2. Decorador @enforce (Intercepción Automática)
from genial_capa import enforce
@enforce(operation="CUSTOMER_SUPPORT", destination="ExternalLLM")
async def consultar_ia(prompt: str) -> str:
# Si la política es MASK, 'prompt' llega automáticamente anonimizado
# Si la política es DENY, la función nunca se ejecuta y lanza CapaPolicyViolationError
return f"Respuesta para: {prompt}"
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 genial_capa-0.1.0.tar.gz.
File metadata
- Download URL: genial_capa-0.1.0.tar.gz
- Upload date:
- Size: 34.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5cf3b7b582ae4a3a337e21be04cd0871f277662d259971236bdee136a528e8e
|
|
| MD5 |
ad42bb46b5a0fdd768722e000d5d2ca5
|
|
| BLAKE2b-256 |
81b4a2fdd0b73b8b7f3a41b03028497fcf72fa9177e87dfc3245e0c2a2ce3a77
|
Provenance
The following attestation bundles were made for genial_capa-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on Tiberwood/genial-capa-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genial_capa-0.1.0.tar.gz -
Subject digest:
b5cf3b7b582ae4a3a337e21be04cd0871f277662d259971236bdee136a528e8e - Sigstore transparency entry: 2667628332
- Sigstore integration time:
-
Permalink:
Tiberwood/genial-capa-sdk@da69d1175b7663ae20c8d6cf1ee6e171f7c0b0c6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Tiberwood
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@da69d1175b7663ae20c8d6cf1ee6e171f7c0b0c6 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file genial_capa-0.1.0-py3-none-any.whl.
File metadata
- Download URL: genial_capa-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67efb6c8ae717736bca4b076b1726f8dcb0e03f2100694417c62d3b316a3beb9
|
|
| MD5 |
83c7375418600b920db338a6e46d2908
|
|
| BLAKE2b-256 |
84292acff7e43bd74358d23d03738ea38ed1e591ecda5fd11581c9e3aa171a89
|
Provenance
The following attestation bundles were made for genial_capa-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on Tiberwood/genial-capa-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genial_capa-0.1.0-py3-none-any.whl -
Subject digest:
67efb6c8ae717736bca4b076b1726f8dcb0e03f2100694417c62d3b316a3beb9 - Sigstore transparency entry: 2667628444
- Sigstore integration time:
-
Permalink:
Tiberwood/genial-capa-sdk@da69d1175b7663ae20c8d6cf1ee6e171f7c0b0c6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Tiberwood
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@da69d1175b7663ae20c8d6cf1ee6e171f7c0b0c6 -
Trigger Event:
workflow_dispatch
-
Statement type: