Skip to main content

Official Python SDK for AetherLab's AI Guardrails and Compliance Platform

Project description

AetherLab Python SDK

Official Python SDK for the AetherLab AI Control Layer.

Installation

pip install aetherlab

Quick Start

from aetherlab import AetherLabClient

# Initialize the client
client = AetherLabClient(api_key="your-api-key")

# Validate content (recommended new API)
result = client.validate_content(
    content="Your AI-generated content here",
    content_type="customer_support",
    desired_attributes=["helpful", "professional"],
    prohibited_attributes=["rude", "misleading"]
)

# Check compliance metrics
print(f"Compliant: {result.is_compliant}")
print(f"Probability of non-compliance: {result.avg_threat_level:.1%}")
print(f"Confidence in compliance: {result.confidence_score:.1%}")

if result.is_compliant:
    print(f"✅ Content is safe: {result.content}")
else:
    print(f"❌ Issues found: {result.violations}")
    print(f"💡 Suggestion: {result.suggested_revision}")

# Legacy API (still supported)
result = client.test_prompt(
    user_prompt="Hello, how can I help?",
    blacklisted_keywords=["harmful", "dangerous"]
)
print(f"Compliant: {result.is_compliant}")

Features

  • ✅ Content validation with context-aware analysis
  • ✅ Multi-language support
  • ✅ Real-time compliance checking
  • ✅ Suggested revisions for non-compliant content
  • ✅ Legacy API compatibility
  • ✅ Media analysis capabilities
  • ✅ Audit logging

Documentation

For full documentation, visit docs.aetherlab.ai

Examples

See the examples directory for complete examples.

Support

License

MIT

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

aetherlab-0.3.1.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

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

aetherlab-0.3.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file aetherlab-0.3.1.tar.gz.

File metadata

  • Download URL: aetherlab-0.3.1.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for aetherlab-0.3.1.tar.gz
Algorithm Hash digest
SHA256 cc355d803345a9f16f11472f1c561edc1426a4ef160f9605d1403402dc5514cc
MD5 907b9d4e560d8f29e552f5409aeeaca6
BLAKE2b-256 86b028efacb79a7abec831c808eca808208ab133b2f8d7cc6a5253ab9719d459

See more details on using hashes here.

File details

Details for the file aetherlab-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: aetherlab-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for aetherlab-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11c353f1dd19f4427c0c2a203797c0c625f751af94c999d7f08bd00f7b448fd2
MD5 ea222b88ab22eda2161c33c2ca903015
BLAKE2b-256 cced475bc61b0a015fab11172d33a433e90fcbf2181c32920d1ab4e7be1988db

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