modlee.api_config module
- class modlee.api_config.ModleeAPIConfig[source]
Bases:
object
Singleton class to manage API configuration and client initialization for Modlee. Ensures that only one instance of the configuration exists and handles API key validation and client setup.
- ensure_api_key()[source]
Ensures that the API key is set and matches the client’s API key. Logs warnings if the API key is not set or if there is a mismatch.
- Returns:
True if the API key is set and matches the client’s API key, False otherwise.
- get_client()[source]
Returns the Modlee client after ensuring that the API key is correctly set.
- Returns:
The Modlee client.