Skip to content

Commit 4bb9693

Browse files
committed
Add to docstring in get_client for cli that it raises if no api key found
1 parent 53bdacc commit 4bb9693

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/humanloop/cli/__main__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@
2828
MAX_FILES_TO_DISPLAY = 10
2929

3030
def get_client(api_key: Optional[str] = None, env_file: Optional[str] = None, base_url: Optional[str] = None) -> Humanloop:
31-
"""Get a Humanloop client instance."""
31+
"""Get a Humanloop client instance.
32+
33+
If no API key is provided, it will be loaded from the .env file, or the environment variable HUMANLOOP_API_KEY.
34+
35+
Raises:
36+
click.ClickException: If no API key is found.
37+
"""
3238
if not api_key:
3339
if env_file:
3440
load_dotenv(env_file)

0 commit comments

Comments
 (0)