Skip to content

Commit 9493644

Browse files
committed
Update configuration.mdx based on issue #266
1 parent 132c329 commit 9493644

File tree

1 file changed

+30
-15
lines changed

1 file changed

+30
-15
lines changed

fern/products/sdks/overview/python/configuration.mdx

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,20 @@ groups:
7272
</ParamField>
7373

7474
<ParamField path="package_name" type="string" default="null" required={false} toc={true}>
75-
76-
Specifies the Python package name that users will import your generated client
77-
from.
75+
Specifies the Python package name that users will import your generated client from.
7876

79-
For example, setting `package_name: "my_custom_package"` enables users to use
80-
`my_custom_package import Client` to import your client:
77+
For example, setting `package_name: "my_custom_package"` enables users to use `my_custom_package import Client` to import your client:
8178

82-
```yaml {7-10}
83-
default-group: local
84-
groups:
85-
local:
86-
generators:
87-
- name: fernapi/fern-python
88-
version: 0.7.1
89-
config:
90-
package_name: "my_custom_package"
91-
```
79+
```yaml
80+
default-group: local
81+
groups:
82+
local:
83+
generators:
84+
- name: fernapi/fern-python
85+
version: 0.7.1
86+
config:
87+
package_name: "my_custom_package"
88+
```
9289
</ParamField>
9390

9491
<ParamField path="pydantic_config" type="SdkPydanticModelCustomConfig" default="SdkPydanticModelCustomConfig()" required={false} toc={true}>
@@ -142,6 +139,24 @@ groups:
142139
<ParamField path="pyproject_toml" type="string" default="null" required={false} toc={true}>
143140
</ParamField>
144141
142+
<ParamField path="sdk_variables" type="object" default="{}" required={false} toc={true}>
143+
Configure SDK variables that are injected into endpoint paths. These variables are provided when constructing the client and reused across requests. For example:
144+
145+
```yaml
146+
# OpenAPI/Swagger spec
147+
x-fern-sdk-variables:
148+
project_id:
149+
type: string
150+
description: The project ID to use for requests
151+
152+
# SDK Usage
153+
client = Client(project_id="my-project")
154+
client.some_endpoint() # Will use project_id in path
155+
```
156+
157+
This was added in version 4.24.0 of the Python generator.
158+
</ParamField>
159+
145160
<ParamField path="should_generate_websocket_clients" type="bool" default="false" required={false} toc={true}>
146161
Feature flag that enables generation of Python websocket clients.
147162
</ParamField>

0 commit comments

Comments
 (0)