Catalog PyPI
Back to packageRELEASE DETAILS

0.1.1

PyPI

ai-catalyst

Production-ready AI components framework with security and resilience

aiasyncllmpiiresiliencesecurity
Published30 Sept 2025
Direct dependencies14
Transitive dependenciesNot calculated

README

Version 0.1.1 documentation

AI_Catalyst Framework

PyPI version Python 3.9+ License: MIT

A production-ready AI components framework with enterprise-grade security, resilience, and async performance optimizations.

🚀 Features

Core Components

  • 🤖 Three-Tier LLM System - Local/Network/OpenAI with concurrent failover (3x faster)
  • 🔒 PII Detection & Scrubbing - Enterprise-grade data protection with audit logging
  • 📁 Multi-Format File Processing - Async streaming for JSON, JSONL, CSV, TXT
  • 🗄️ Database Patterns - Async PostgreSQL with connection pooling
  • ⚙️ Configuration Management - Encrypted config with key rotation
  • 📊 System Monitoring - Health checks and performance metrics

Security & Resilience

  • 🔐 Secure Configuration - AES-256 encryption for sensitive data
  • 🔑 API Key Vault - Secure storage with automatic rotation
  • 🚦 Rate Limiting - Token bucket algorithm with configurable limits
  • 📋 Audit Logging - Comprehensive compliance tracking
  • 🔄 Retry Logic - Exponential backoff with circuit breakers
  • 💚 Health Monitoring - Continuous service availability checks

📦 Installation

pip install ai-catalyst

⚡ Quick Start

Basic Usage

import asyncio
from ai_catalyst import LLMProvider, PIIProcessor, FileProcessor

async def main():
    # LLM with automatic failover
    llm = LLMProvider()
    response = await llm.generate_async("Explain quantum computing")
    print(f"Response: {response['content']}")
    
    # PII scrubbing with audit logging
    pii = PIIProcessor()
    clean_text = await pii.scrub_text_async("Call John at 555-1234")
    print(f"Scrubbed: {clean_text}")  # "Call <NAME> at <PHONE>"
    
    # Async file processing
    processor = FileProcessor()
    async for item in processor.process_file_async("data.json"):
        print(f"Processed: {item['data']}")

asyncio.run(main())

Production Setup with Security

from ai_catalyst import (
    LLMProvider, APIKeyVault, RateLimiter, 
    AuditLogger, SecureConfigManager
)

# Setup secure environment
key_vault = APIKeyVault()
key_vault.store_key('openai', 'your-api-key')

rate_limiter = RateLimiter()
audit_logger = AuditLogger(log_file='audit.log')

# Initialize with security components
llm = LLMProvider(
    key_vault=key_vault,
    rate_limiter=rate_limiter,
    audit_logger=audit_logger
)

🏗️ Architecture

Async-First Design

  • Non-blocking I/O - All operations are async by default
  • Concurrent Processing - Parallel execution with semaphore control
  • Backward Compatibility - Sync wrappers for existing code
  • Resource Management - Proper cleanup and session handling

Security Model

  • Zero-Trust - All operations are logged and rate-limited
  • Encryption - Sensitive data encrypted at rest
  • Audit Trail - Complete compliance logging
  • Access Control - API key management with rotation

Resilience Patterns

  • Circuit Breakers - Automatic failure detection and recovery
  • Retry Logic - Exponential backoff with jitter
  • Health Checks - Continuous service monitoring
  • Graceful Degradation - Fallback strategies for all components

📊 Performance

OperationBeforeAfterImprovement
LLM Failover45s15s3x faster
Batch PII Processing60s12s5x faster
File ProcessingBlockingStreamingNon-blocking
Rate LimitingN/A<1msSub-millisecond

🔧 Configuration

Environment Variables

# API Keys
export OPENAI_API_KEY="your-openai-key"
export ANTHROPIC_API_KEY="your-anthropic-key"

# Security
export AI_CATALYST_MASTER_KEY="your-encryption-key"

Configuration File

# config.yaml
llm:
  timeout: 30
  model: "gpt-4"
  
security:
  rate_limits:
    openai: "paid"  # or "free"
  audit_log: "audit.log"
  
processing:
  batch_size: 100
  max_concurrency: 10

🧪 Testing

# Install with dev dependencies
pip install ai-catalyst[dev]

# Run tests
pytest

# Run with coverage
pytest --cov=ai_catalyst

📚 Documentation

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure all tests pass
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details.

🆘 Support

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 16

Native requirements
14 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
asyncpg
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
asyncpg>=0.28.0runtime
aiohttp
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
aiohttp>=3.8.0runtime
aiofiles
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
aiofiles>=23.0.0runtime
pyyaml
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
pyyaml>=6.0runtime
psutil
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
psutil>=5.9.0runtime
openai
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
openai>=1.0.0runtime
regex
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
regex>=2023.0.0runtime
pandas
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
pandas>=2.0.0runtime
cryptography
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
cryptography>=41.0.0runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
pytest>=7.0.0; extra == "dev"runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.21.0; extra == "dev"runtime
black
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
black>=23.0.0; extra == "dev"runtime
flake8
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
flake8>=6.0.0; extra == "dev"runtime
mypy
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
mypy>=1.0.0; extra == "dev"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"test\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
pytest>=7.0.0; extra == "test"runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"test\"",
  "requires_python": ">=3.9",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.21.0; extra == "test"runtime

Distribution files

2 collected
ai_catalyst-0.1.1-py3-none-any.whl

bdist_wheel · 42.13 KB · Python py3

Source file
ai_catalyst-0.1.1.tar.gz

sdist · 39.44 KB · Python source

Source file

Repository

PENDING
ericmedlock/ai_catalyst

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:07 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:6d2e24e6ed4e1d61fb996f9594bbf6e6c7dcdeb25f5e4069eceb732e7dae8f6d

Other collected versions

View all collected versions →