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
The chunk size to use (if any) when processing a response bytes stream within `iter_bytes` or `aiter_bytes` results in: `for chunk in response.iter_bytes(chunk_size=<default_bytes_stream_chunk_size>):`
When enabled, the python generator will not run Black formatting in the generated code. Black is slow so this can potentially speed up code generation quite a bit.
By default, the generator generates a client that times out after 60 seconds. You can customize this value by providing a different number or setting to `infinity` to get rid of timeouts.
Whether or not to generate TypedDicts instead of Pydantic Models for file upload request objects. Note that this flag was only introduced due to an oversight in the `use_typeddict_requests` flag implementation; it should be removed in the future.
169
168
</ParamField>
170
169
171
-
### client
172
-
Configuration for the generated client class and file structure.
170
+
### Extension Headers
173
171
174
-
```yaml
175
-
config:
176
-
client:
177
-
filename: "my_client.py"
178
-
class_name: "MyClient"
179
-
exported_filename: "my_client.py"
180
-
exported_class_name: "MyClient"
181
-
```
172
+
You can specify SDK variables using the `x-fern-sdk-variables` extension in your OpenAPI spec. These will be added as constructor parameters in the generated client:
173
+
174
+
```yaml
175
+
components:
176
+
# ...other components
177
+
x-fern-sdk-variables:
178
+
project_id:
179
+
type: string
180
+
description: The ID of the project
181
+
pattern: "^proj_[a-zA-Z0-9]+$"
182
+
```
183
+
184
+
This will generate a client constructor that accepts the variable:
185
+
186
+
```python
187
+
from my_sdk import Client
188
+
189
+
client = Client(
190
+
project_id="proj_abc123" # Required variable from x-fern-sdk-variables
191
+
)
192
+
```
193
+
194
+
The SDK will automatically inject these variables into API paths that contain matching parameter names.
195
+
196
+
### client
197
+
Configuration for the generated client class and file structure.
0 commit comments