Overview
TheConfig class manages authentication credentials for connecting to the AveniECA API server. It supports both token-based and username/password authentication.
Class Reference
Config
Dataclass for API authentication configuration.
Import:
Fields
API token for token-based authentication. When provided, this takes precedence over username/password authentication.
Username for credential-based authentication. Used in conjunction with
password when api_token is not provided.Password for credential-based authentication. Used in conjunction with
username when api_token is not provided.The base URI of the AveniECA API server (e.g.,
https://api.avenieca.com)Usage Examples
Token-Based Authentication
Username/Password Authentication
Environment-Based Configuration
Local Development Setup
Authentication Priority
The SDK uses the following authentication priority:- API Token - If
api_tokenis provided, it will be used for authentication - Username/Password - If
api_tokenis empty, the SDK falls back to username/password authentication
Security Best Practices
Related
- Broker Configuration - Configure Kafka broker settings
- ECA Client - Using the AveniECA client