Metadata-Version: 2.2
Name: enkryptai-sdk
Version: 0.1.0
Summary: A Python SDK with guardrails and red teaming functionality for API interactions
Home-page: https://github.com/enkryptai/enkryptai-sdk
Author: Enkrypt AI Team
Author-email: software@enkryptai.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-python
Dynamic: summary

# enkryptai-sdk

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

## Installation

```bash
pip install enkryptai-sdk
```

## Usage

```python
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

```python
config = GuardrailsConfig.injection_attack()
```

### Policy Violation

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

### Topic Detection

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

### Red Teaming

```python
config = GuardrailsConfig.red_teaming()
```

## Guardrails Client

```python
client = GuardrailsClient(api_key="your_api_key")

```

## Detect Attack

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

## Detect Policy Violation

```python
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

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

