Integrations Module
Standardization: Provides a consistent approach to configuring and managing external systems.
Immutable Configurations: Uses secure, immutable configuration containers.
Common Interfaces: Defines standard methods for all integration implementations.
Adapters: Converts backend DTOs into integration instances.
Base Classes & Implementations: Offers reusable base functionality and specific service implementations.
1. Integration Configuration
The IntegrationConfig is a frozen dataclass that stores configuration settings for integrations.
File: autoppia_sdk/src/integrations/config.py
pythonCopiarfrom dataclasses import dataclass
from typing import Dict, Any
@dataclass(frozen=True)
class IntegrationConfig:
"""Immutable configuration container for integration instances.
Attributes:
name (str): The unique identifier or name of the integration.
category (str): The category or type of integration (e.g., 'database', 'messaging', 'storage', etc.).
attributes (Dict[str, Any]): A dictionary containing configuration parameters specific to the integration.
"""
name: str
category: str
attributes: Dict[str, Any]2. Integration Interface and Base Class
The IntegrationInterface defines the required methods for integrations, while the Integration base class implements the interface.
File: autoppia_sdk/src/integrations/interface.py
File: autoppia_sdk/src/integrations/implementations/base.py
3. SMTP Email Integration
The SDK includes an example implementation for email functionality using SMTP (for sending emails) and IMAP (for receiving emails).
File: autoppia_sdk/src/integrations/implementations/email/smtp_integration.py
4. Integration Adapters
The adapters convert backend configuration DTOs into SDK objects and instantiate the corresponding integration implementations.
File: autoppia_sdk/src/integrations/adapter.py
Last updated