Retrieve the Google API key from an environment variable or user input.
()
| 3 | from typing import Dict, List, Optional |
| 4 | |
| 5 | def get_api_key() -> str: |
| 6 | """Retrieve the Google API key from an environment variable or user input.""" |
| 7 | api_key = os.environ.get("GOOGLE_API_KEY") |
| 8 | if not api_key: |
| 9 | api_key = input("Please enter your Google API key: ").strip() |
| 10 | return api_key |
| 11 | |
| 12 | def parse_generated_content(content: str) -> Dict[str, str]: |
| 13 | """ |
no outgoing calls
no test coverage detected