Skip to content

Commit c24c528

Browse files
authored
Merge pull request #1153 from janmatzek/jmat-update-profiles-documentation
chore(docs): update profiles.yaml example
2 parents 28ac2b2 + 09fd187 commit c24c528

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

docs/content/en/latest/getting-started.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,19 @@ Start integrating GoodData into your Python application right now.
4242
profiles.yaml file structure example:
4343

4444
```yaml
45-
default:
46-
host: http://localhost:3000
47-
token: YWRtaW46Ym9vdHN0cmFwOmFkbWluMTIz
48-
custom_headers: #optional
49-
Host: localhost
50-
extra_user_agent: xyz #optional
45+
profiles:
46+
dev:
47+
host: http://localhost:3000
48+
token: $GOODDATA_API_TOKEN_DEV
49+
custom_headers: #optional
50+
Host: localhost
51+
extra_user_agent: xyz #optional
52+
default_profile: dev
53+
access: {}
5154
```
5255

56+
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.
57+
5358
1. Start using Python SDK! For example, get a list of all workspaces:
5459

5560
```python

gooddata-sdk/gooddata_sdk/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,14 @@ def _create_profile_aac(profile: str, content: dict) -> dict:
283283
def _get_profile(profile: str, content: dict) -> dict[str, Any]:
284284
is_aac_config = AacConfig.can_structure(content)
285285
if not is_aac_config and profile not in content:
286-
raise ValueError("Configuration is invalid. Please check the documentation for the valid configuration.")
286+
raise ValueError(
287+
"Configuration is invalid. Please check the documentation for the valid configuration: https://www.gooddata.com/docs/python-sdk/latest/getting-started/"
288+
)
287289
if is_aac_config:
288290
return _create_profile_aac(profile, content)
289291
else:
290292
warn(
291-
"Used configuration is deprecated and will be removed in the future. Please use the new configuration.",
293+
"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/",
292294
DeprecationWarning,
293295
stacklevel=2,
294296
)

0 commit comments

Comments
 (0)