You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/python-sdk/guides/client.mdx
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ API tokens provide secure, long-lived authentication and are the recommended met
80
80
<TabsgroupId="async-sync">
81
81
<TabItemvalue="Async"default>
82
82
<TabsgroupId="env-config">
83
-
<TabItemvalue="Config"default>
83
+
<TabItemvalue="Code"default>
84
84
85
85
We can set the address and API token directly in the `Config` object:
86
86
@@ -109,7 +109,7 @@ client = InfrahubClient() # token and address are read from the INFRAHUB_API_TOK
109
109
</TabItem>
110
110
<TabItemvalue="Sync">
111
111
<TabsgroupId="env-config">
112
-
<TabItemvalue="Config"default>
112
+
<TabItemvalue="Code"default>
113
113
114
114
We can set the address and API token directly in the `Config` object:
115
115
@@ -145,7 +145,7 @@ For interactive authentication, use username and password. The SDK automatically
145
145
<TabsgroupId="async-sync">
146
146
<TabItemvalue="Async"default>
147
147
<TabsgroupId="env-config">
148
-
<TabItemvalue="Config"default>
148
+
<TabItemvalue="Code"default>
149
149
150
150
We can set the address, username and password directly in the `Config` object:
151
151
@@ -175,7 +175,7 @@ client = InfrahubClient() # username and password are read from the INFRAHUB_USE
175
175
</TabItem>
176
176
<TabItemvalue="Sync">
177
177
<TabsgroupId="env-config">
178
-
<TabItemvalue="Config"default>
178
+
<TabItemvalue="Code"default>
179
179
180
180
We can set the address, username and password directly in the `Config` object:
181
181
@@ -214,7 +214,7 @@ Your client is now configured and ready to use!
214
214
Configure your client to work with a specific Infrahub branch instead of the default `main` branch. This is particularly useful when working on feature branches or experimental changes, as it eliminates the need to specify the branch name in every method call.
Your client is now configured to use the specified default branch instead of `main`. Remember that you can always override this setting by explicitly passing the `branch` argument to any method call.
250
250
:::
251
251
252
-
## Hello World example
252
+
## Hello world example
253
253
254
254
Let's create a simple "Hello World" example to verify your client configuration works correctly. This example will connect to your Infrahub instance and query the available accounts.
255
255
@@ -260,7 +260,7 @@ touch hello_world.py
260
260
```
261
261
262
262
:::danger File Naming
263
-
Avoid naming your script `test.py` as this name could conflict with Python's testing modules and the SDK's internal tests.
263
+
Avoid naming your script `test.py` as this name could conflict with Python's testing modules.
264
264
:::
265
265
266
266
2. Add the following code to `hello_world.py`:
@@ -338,7 +338,7 @@ If everything is configured correctly, you should see:
338
338
When developing or troubleshooting, you can enable GraphQL query logging to see exactly what requests are being sent to Infrahub:
0 commit comments