gabm.io.read_data module
Reads data from various sources.
- gabm.io.read_data.read_api_keys(file_path: str | Path) dict[str, str]
Reads API keys from a CSV file into a dictionary. Assumes the CSV has two columns: ‘api’ and ‘key’, with a header row.
- Args:
file_path (str or Path): Path to the CSV file.
- Returns:
dict[str, str]: Dictionary with API names as keys and their corresponding keys as values.
- Raises:
ValueError: If file_path is not provided. FileNotFoundError: If the specified file does not exist.