SDK Installation¶
Detailed installation instructions for the Aegis Python SDK.
Requirements¶
- Python: 3.9, 3.10, 3.11, 3.12, or 3.13
- Operating System: Linux, macOS, Windows
- Dependencies: Automatically installed with pip
Installation Methods¶
pip (Recommended)¶
uv (Fast Python Package Manager)¶
poetry¶
pipx (CLI Only)¶
If you only need the CLI tool:
Optional Dependencies¶
LLM Integrations¶
# OpenAI support
pip install aegis-sdk[openai]
# Anthropic support
pip install aegis-sdk[anthropic]
# LangChain support
pip install aegis-sdk[langchain]
# JWT license validation
pip install aegis-sdk[jwt]
# All optional dependencies
pip install aegis-sdk[all]
Verify Installation¶
Check Version¶
The CLI automatically checks for updates and notifies you when a new version is available.
Quick Test¶
from aegis_sdk import Aegis
aegis = Aegis()
# Test detection
result = aegis.process(
text="Contact [email protected] or call 555-123-4567",
destination="AI_TOOL"
)
print(f"Decision: {result.decision}")
print(f"Masked: {result.masked_content}")
Output:
Configuration¶
Environment Variables¶
| Variable | Description | Default |
|---|---|---|
AEGIS_LICENSE_KEY |
License key for enterprise features | None |
Programmatic Configuration¶
from aegis_sdk import Aegis
# Basic usage (no license required)
aegis = Aegis()
# With license key for enterprise features
aegis = Aegis(license_key="aegis_lic_xxx")
# With custom policy configuration
aegis = Aegis(
policy_config={
"destinations": {
"AI_TOOL": {
"masked": ["EMAIL", "PHONE"],
"blocked": ["SSN", "CREDIT_CARD"]
}
}
}
)
# With policy groups (departments)
aegis = Aegis(
license_key="aegis_lic_xxx",
policy_group="marketing"
)
Upgrading¶
Check for Updates¶
The CLI automatically checks for updates:
If an update is available, you'll see:
Upgrade¶
Uninstallation¶
Troubleshooting¶
SSL Certificate Errors¶
If you encounter SSL errors:
Proxy Configuration¶
For corporate networks:
Permission Errors¶
Use --user flag:
Or use a virtual environment:
Docker¶
In Your Dockerfile¶
With Optional Dependencies¶
Next Steps¶
- Quick Start - Start using the SDK
- API Reference - Full documentation
- CLI Reference - Command-line usage