From 09fd18705551cb4964fa0c2b22672bd996d471e4 Mon Sep 17 00:00:00 2001 From: janmatzek Date: Mon, 15 Sep 2025 11:08:39 +0200 Subject: [PATCH] chore(docs): update profiles.yaml example --- docs/content/en/latest/getting-started.md | 17 +++++++++++------ gooddata-sdk/gooddata_sdk/utils.py | 6 ++++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/content/en/latest/getting-started.md b/docs/content/en/latest/getting-started.md index e82c87168..f312fad64 100644 --- a/docs/content/en/latest/getting-started.md +++ b/docs/content/en/latest/getting-started.md @@ -42,14 +42,19 @@ Start integrating GoodData into your Python application right now. profiles.yaml file structure example: ```yaml - default: - host: http://localhost:3000 - token: YWRtaW46Ym9vdHN0cmFwOmFkbWluMTIz - custom_headers: #optional - Host: localhost - extra_user_agent: xyz #optional + profiles: + dev: + host: http://localhost:3000 + token: $GOODDATA_API_TOKEN_DEV + custom_headers: #optional + Host: localhost + extra_user_agent: xyz #optional + default_profile: dev + access: {} ``` + The `token` field should reference an environment variable that holds your personal access token. The `access` field can include references to environment variables with data source secrets, or it can be left empty if not needed. + 1. Start using Python SDK! For example, get a list of all workspaces: ```python diff --git a/gooddata-sdk/gooddata_sdk/utils.py b/gooddata-sdk/gooddata_sdk/utils.py index 8632a66ab..7f45b8a15 100644 --- a/gooddata-sdk/gooddata_sdk/utils.py +++ b/gooddata-sdk/gooddata_sdk/utils.py @@ -283,12 +283,14 @@ def _create_profile_aac(profile: str, content: dict) -> dict: def _get_profile(profile: str, content: dict) -> dict[str, Any]: is_aac_config = AacConfig.can_structure(content) if not is_aac_config and profile not in content: - raise ValueError("Configuration is invalid. Please check the documentation for the valid configuration.") + raise ValueError( + "Configuration is invalid. Please check the documentation for the valid configuration: https://www.gooddata.com/docs/python-sdk/latest/getting-started/" + ) if is_aac_config: return _create_profile_aac(profile, content) else: warn( - "Used configuration is deprecated and will be removed in the future. Please use the new configuration.", + "Used configuration is deprecated and will be removed in the future. Please use the new configuration: https://www.gooddata.com/docs/python-sdk/latest/getting-started/", DeprecationWarning, stacklevel=2, )