Skip to main content

A Python SDK with guardrails and red teaming functionality for API interactions

Project description

enkryptai-sdk

A Python SDK with guardrails and red teaming functionality for API interactions.

Installation

pip install enkryptai-sdk

Usage

from enkryptai_sdk import GuardrailsClient, GuardrailsConfig

client = GuardrailsClient(api_key="your_api_key", base_url="https://api.enkryptai.com")

config = GuardrailsConfig.injection_attack()

Guardrails Configs

Injection Attack

config = GuardrailsConfig.injection_attack()

Policy Violation

config = GuardrailsConfig.policy_violation(policy_text="You must be 18 years or older to use this service.")

Topic Detection

config = GuardrailsConfig.topic_detection(topic="injection attack")

Red Teaming

config = GuardrailsConfig.red_teaming()

Guardrails Client

client = GuardrailsClient(api_key="your_api_key")

Detect Attack

config = GuardrailsConfig.injection_attack()
response = client.detect(text="Hello, world!", config=config)

Detect Policy Violation

config = GuardrailsConfig.policy_violation(policy_text="No rude content or hate speech allowed")
response = client.detect(text="I hate everyone", config=config)

Detect Topic Detection

config = GuardrailsConfig.topic_detection(topic="finance")
response = client.detect(text="I am buying $1000 of BTC", config=config)

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

enkryptai_sdk-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

enkryptai_sdk-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file enkryptai_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: enkryptai_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for enkryptai_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 505dbb86f1b7529181074b704ccf2830c9280a4b6223d02d5f412996ea79178a
MD5 4e6ca3bac1a496a44862feed7a820189
BLAKE2b-256 19e47333226709b5002a45c22bcb2d9f5a2fbe888a607b391a1ec7eb925ef707

See more details on using hashes here.

File details

Details for the file enkryptai_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: enkryptai_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for enkryptai_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75f2c75988a23cb62a30b54aed18cb342913f6c0674eecf3bf5cb8b9a9249e3a
MD5 eeb646708b299c33b97ccd9140b89ad6
BLAKE2b-256 ab4ff8778d52564b33b204bf54f3fd391735459197bb8948f415ca6f81c3c22c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page