Skip to main content

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

genial_capa-0.1.0.tar.gz (34.0 kB view details)

Uploaded Source

Built Distribution

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

genial_capa-0.1.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

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

Hashes for genial_capa-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b5cf3b7b582ae4a3a337e21be04cd0871f277662d259971236bdee136a528e8e
MD5 ad42bb46b5a0fdd768722e000d5d2ca5
BLAKE2b-256 81b4a2fdd0b73b8b7f3a41b03028497fcf72fa9177e87dfc3245e0c2a2ce3a77

See more details on using hashes here.

Provenance

The following attestation bundles were made for genial_capa-0.1.0.tar.gz:

Publisher: publish-pypi.yml on Tiberwood/genial-capa-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for genial_capa-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67efb6c8ae717736bca4b076b1726f8dcb0e03f2100694417c62d3b316a3beb9
MD5 83c7375418600b920db338a6e46d2908
BLAKE2b-256 84292acff7e43bd74358d23d03738ea38ed1e591ecda5fd11581c9e3aa171a89

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page