Metadata-Version: 2.4
Name: safekeylab
Version: 4.0.0
Summary: Enterprise AI Security SDK - Secure OpenAI, Anthropic, and LangChain via SafeKeyLab API
Home-page: https://github.com/safekeylab/python-sdk
Author: SafeKey Lab Inc.
Author-email: team@safekeylab.com
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0
Requires-Dist: colorama>=0.4.6
Requires-Dist: tabulate>=0.9.0
Requires-Dist: click>=8.1.0
Requires-Dist: python-dotenv>=0.21.0
Requires-Dist: tqdm>=4.65.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: black>=22.0; extra == "dev"
Requires-Dist: flake8>=5.0; extra == "dev"
Provides-Extra: langchain
Requires-Dist: langchain>=0.1.0; extra == "langchain"
Requires-Dist: langchain-core>=0.1.0; extra == "langchain"
Provides-Extra: llamaindex
Requires-Dist: llama-index>=0.10.0; extra == "llamaindex"
Provides-Extra: semantic-kernel
Requires-Dist: semantic-kernel>=1.0.0; extra == "semantic-kernel"
Provides-Extra: google-adk
Requires-Dist: google-adk>=0.1.0; extra == "google-adk"
Provides-Extra: all
Requires-Dist: langchain>=0.1.0; extra == "all"
Requires-Dist: langchain-core>=0.1.0; extra == "all"
Requires-Dist: llama-index>=0.10.0; extra == "all"
Requires-Dist: semantic-kernel>=1.0.0; extra == "all"
Requires-Dist: google-adk>=0.1.0; extra == "all"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# SafeKeyLab SDK

[![PyPI version](https://badge.fury.io/py/safekeylab.svg)](https://pypi.org/project/safekeylab/)
[![Python Versions](https://img.shields.io/pypi/pyversions/safekeylab.svg)](https://pypi.org/project/safekeylab/)
[![License](https://img.shields.io/badge/License-Proprietary-red.svg)](https://safekeylab.com/terms)

**Enterprise AI Security & PII Protection** - Protect your AI applications from prompt injection, data leaks, and compliance violations.

## Features

- **PII Detection & Redaction** - 30+ entity types with 99.9% accuracy
- **LLM Security Guard** - Block prompt injection, jailbreaks, and adversarial attacks
- **Framework Integrations** - LangChain, LlamaIndex, Semantic Kernel, Google ADK
- **Compliance Ready** - GDPR, HIPAA, SOC2, PCI-DSS reporting

## Installation

```bash
pip install safekeylab
```

With framework integrations:
```bash
pip install safekeylab[langchain]
pip install safekeylab[llamaindex]
pip install safekeylab[semantic-kernel]
pip install safekeylab[google-adk]
pip install safekeylab[all]
```

## Quick Start

```python
from safekeylab import SafeKeyLab

client = SafeKeyLab(api_key="sk_live_...")

# Detect PII
result = client.detect("Contact john@example.com for details")
print(result.entities)

# Redact PII
protected = client.redact("My SSN is 123-45-6789")
print(protected)  # "My SSN is [SSN]"

# Validate prompts for threats
validation = client.validate_prompt("user input here")
if validation.is_safe:
    # Safe to send to LLM
    pass
```

## Framework Integrations

### LangChain
```python
from safekeylab.integrations import SafeKeyLabCallbackHandler

handler = SafeKeyLabCallbackHandler(api_key="sk_live_...")
# Add to your LangChain callbacks
```

### Google ADK
```python
from safekeylab.integrations import SafeKeyLabADKTools

tools = SafeKeyLabADKTools(api_key="sk_live_...")
# Use with Google Agent Development Kit
```

See [documentation](https://safekeylab.com/docs) for LlamaIndex and Semantic Kernel examples.

## Pricing

| Plan | API Calls/mo | Price |
|------|-------------|-------|
| Developer | 1,000 | Free |
| Startup | 10,000 | $49/mo |
| Growth | 100,000 | $299/mo |
| Enterprise | Unlimited | Contact us |

[View full pricing](https://safekeylab.com/pricing)

## Documentation

- [Getting Started](https://safekeylab.com/docs/getting-started)
- [API Reference](https://safekeylab.com/docs/api)
- [Integration Guides](https://safekeylab.com/docs/integrations)

## Support

- Email: support@safekeylab.com
- Documentation: https://safekeylab.com/docs

---

## Terms of Use

By installing, accessing, or using this SDK, you agree to be bound by SafeKeyLab's [Terms of Service](https://safekeylab.com/terms) and [API License Agreement](https://safekeylab.com/api-license).

### Restrictions

- **No Reverse Engineering**: Decompilation, disassembly, or reverse engineering of this SDK is strictly prohibited.
- **No Redistribution**: Redistribution, sublicensing, or resale of this SDK requires prior written consent from SafeKey Lab, Inc.
- **No Derivative Works**: Creating derivative works based on this SDK's proprietary technology is prohibited.
- **Usage Monitoring**: API usage is monitored for compliance and service optimization.

### Intellectual Property

This SDK and all associated documentation, algorithms, and methodologies are proprietary to SafeKey Lab, Inc. and protected by intellectual property laws including patents (pending), copyrights, and trade secrets.

**Patent Pending** - SafeKey Lab, Inc.

### Disclaimer

THIS SDK IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. SAFEKEYLAB SHALL NOT BE LIABLE FOR ANY DAMAGES ARISING FROM USE OF THIS SDK.

---

Copyright 2024-2025 SafeKey Lab, Inc. All rights reserved.
