Configuration¶
Configuration management for the Bloomy SDK.
Configuration
¶
The Configuration class is responsible for managing authentication.
Initialize a new Configuration instance.
Parameters:
-
api_key
(str | None
, default:None
) –Optional API key. If not provided, will attempt to load from environment variable or configuration file.
Methods:
-
configure_api_key
–Configure the API key using the provided username and password.
Source code in src/bloomy/configuration.py
Functions¶
configure_api_key
¶
Configure the API key using the provided username and password.
Parameters:
-
username
(str
) –The username for authentication
-
password
(str
) –The password for authentication
-
store_key
(bool
, default:False
) –Whether to store the API key (default: False)
Note
This method only fetches and stores the API key if it is currently None. It saves the key under '~/.bloomy/config.yaml' if 'store_key: True' is passed.