Skip to main content

BaseHandler

Class
📁application_sdk.handlers.base
Inheritance chain:
HandlerInterface

A concrete implementation of HandlerInterface specifically designed for interacting with non-SQL data sources. Uses BaseClient for system communication and provides basic implementation of load() method with extensibility for specific data sources.

Methods2

__init__

__init__(self, client=None)
Initialize the handler with an optional BaseClient instance. If no client is provided, it creates a default BaseClient()
Parameters
clientBaseClient
Optional
Client instance for system communication

load

async
async load(self, credentials)
Calls load() on the associated client with the provided credentials
Parameters
credentialsdict
Required
Authentication credentials for the target system

Usage Examples

Basic Handler Usage

Create a BaseHandler with or without a custom client

# Basic usage with default client
handler = BaseHandler()

# Usage with custom client
from .clients import MyApiClient
client = MyApiClient()
handler = BaseHandler(client=client)

# Use with Application
from application_sdk.server.fastapi import APIServer
app = APIServer(handler=handler)