Ajna Cloud SDK
Theajna-cloud-sdk is a core internal Python library designed to handle repetitive backend tasks across the entire suite of Ajna and Ibex services. It minimizes boilerplate code by centralizing authentication, logging, and database connectivity.
Architectural Role
As a foundational SDK rather than a standalone deployable service, it is pulled in as a PIP dependency by services such asibex-data-platform, ibex-ai-service, and Lambda functions.
Core Modules
ajna_sdk.ibex: A highly optimized IbexDB client equipped with request caching, direct Lambda invocation routing, and batch operation support for high-throughput telemetrics.ajna_sdk.auth: Provides a drop-in@require_authdecorator capable of validating JWTs from multiple sources including local SQLite testing databases and AWS Cognito User Pools.ajna_sdk.logger: Standardizes structured JSON logging across the platform, injecting execution context and request IDs to enable distributed tracing.ajna_sdk.http: Provides standardized HTTP response formats and CORS boundary management specifically tailored for AWS Lambda integrations.
Integration & Configuration
The SDK operates extensively on environment variables to control its behavior without code changes acrossdevelopment, staging, and production environments:
IBEX_API_URL/IBEX_API_KEY: Connection strings for the primary database.AUTH_MODE: Dynamically toggle betweenlocal,cognito, andtest.COGNITO_USER_POOL_ID: Secures the boundary when deployed in the cloud.
