@@ -21,13 +21,15 @@ groups:
2121## SDK Configuration Options
2222
2323<ParamField path="additional_init_exports" type="array" default="null" required={false} toc={true}>
24+ Additional exports to include in the package's __init__.py file.
2425</ParamField>
2526
2627<ParamField path="default_bytes_stream_chunk_size" type="number" default="null" required={false} toc={true}>
2728 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>):`
2829</ParamField>
2930
3031<ParamField path="exclude_types_from_init_exports" type="bool" default="false" required={false} toc={true}>
32+ When enabled, type definitions will not be exported in the package's __init__.py file.
3133</ParamField>
3234
3335<ParamField path="extra_dependencies" type="object" default="{}" required={false} toc={true}>
@@ -40,58 +42,69 @@ groups:
4042</ParamField>
4143
4244<ParamField path="extra_dev_dependencies" type="object" default="{}" required={false} toc={true}>
45+ Additional development dependencies to include in the generated package.
4346</ParamField>
4447
4548<ParamField path="extras" type="object" default="{}" required={false} toc={true}>
49+ Define optional feature sets and their dependencies.
4650</ParamField>
4751
4852<ParamField path="flat_layout" type="bool" default="false" required={false} toc={true}>
53+ When enabled, generates a flatter directory structure without nested resource folders.
4954</ParamField>
5055
5156<ParamField path="follow_redirects_by_default" type="bool" default="true" required={false} toc={true}>
5257 Whether to follow redirects by default in HTTP requests.
5358</ParamField>
5459
5560<ParamField path="improved_imports" type="bool" default="true" required={false} toc={true}>
56- Feature flag that improves imports in the Python SDK by removing nested `resources` directory
61+ Feature flag that improves imports in the Python SDK by removing nested `resources` directory.
5762</ParamField>
5863
5964<ParamField path="include_legacy_wire_tests" type="bool" default="false" required={false} toc={true}>
60- Whether or not to include legacy wire tests in the generated SDK
65+ Whether or not to include legacy wire tests in the generated SDK.
6166</ParamField>
6267
6368<ParamField path="include_union_utils" type="bool" default="false" required={false} toc={true}>
69+ When enabled, generates utility methods for working with union types.
6470</ParamField>
6571
6672<ParamField path="inline_path_params" type="bool" default="false" required={false} toc={true}>
67- If true, treats path parameters as named parameters in endpoint functions.
73+ If true, treats path parameters as named parameters in endpoint functions. This allows using common variables like project_id across multiple endpoints :
74+
75+ ` ` ` yaml
76+ config:
77+ inline_path_params: true
78+ x-fern-sdk-variables:
79+ project_id:
80+ type: string
81+ description: The project ID to use for all requests
82+ ` ` `
6883</ParamField>
6984
7085<ParamField path="inline_request_params" type="bool" default="true" required={false} toc={true}>
7186 Feature flag that removes the usage of request objects, and instead uses parameters in function signatures where possible.
7287</ParamField>
7388
7489<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.
90+ Specifies the Python package name that users will import your generated client from.
7891
79- For example, setting `package_name : " my_custom_package" ` enables users to use
80- ` my_custom_package import Client` to import your client:
81-
82- ` ` ` yaml {7-10}
83- default-group: local
84- groups:
85- local:
86- generators:
87- - name: fernapi/fern-python
92+ For example, setting `package_name : " my_custom_package" ` enables users to use ` my_custom_package import Client` to import your client:
93+
94+ ` ` ` yaml {7-10}
95+ default-group: local
96+ groups:
97+ local:
98+ generators:
99+ - name: fernapi/fern-python
88100 version: 0.7.1
89101 config:
90102 package_name: "my_custom_package"
91- ` ` `
103+ ` ` `
92104</ParamField>
93105
94106<ParamField path="pydantic_config" type="SdkPydanticModelCustomConfig" default="SdkPydanticModelCustomConfig()" required={false} toc={true}>
107+ Customize how Pydantic models are generated.
95108</ParamField>
96109
97110<ParamField path="pydantic_config.include_union_utils" type="bool" default="false" required={false} toc={true}>
@@ -112,8 +125,8 @@ groups:
112125 # Visit every case in the union
113126 shape = get_shape()
114127 shape.visit(
115- circle: lambda circle: do_something_with_circle(circle),
116- triangle: lambda triangle: do_something_with_triangle(triangle),
128+ circle= lambda circle: do_something_with_circle(circle),
129+ triangle= lambda triangle: do_something_with_triangle(triangle),
117130 )
118131 ```
119132
@@ -140,20 +153,23 @@ groups:
140153</ParamField>
141154
142155<ParamField path="pyproject_toml" type="string" default="null" required={false} toc={true}>
156+ Custom pyproject.toml content to include in the generated package.
143157</ParamField>
144158
145159<ParamField path="should_generate_websocket_clients" type="bool" default="false" required={false} toc={true}>
146160 Feature flag that enables generation of Python websocket clients.
147161</ParamField>
148162
149163<ParamField path="skip_formatting" type="bool" default="false" required={false} toc={true}>
164+ When true, skips code formatting of generated files.
150165</ParamField>
151166
152167<ParamField path="timeout_in_seconds" type="number | 'infinity'" default="60" required={false} toc={true}>
153168 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.
154169</ParamField>
155170
156171<ParamField path="use_api_name_in_package" type="bool" default="false" required={false} toc={true}>
172+ When enabled, includes the API name in the generated package name.
157173</ParamField>
158174
159175<ParamField path="use_inheritance_for_extended_models" type="bool" default="true" required={false} toc={true}>
0 commit comments