Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion fern/products/sdks/overview/python/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ groups:
local:
generators:
- name: fernapi/fern-python
version: 0.7.1
version: ^4.24.0 # Required for SDK variables support
config:
client:
class_name: "YourClient"
Expand All @@ -23,6 +23,10 @@ groups:
</ParamField>

<ParamField path="client" type="ClientConfiguration" default="ClientConfiguration()" required={false} toc={true}>
The client configuration object allows you to customize the generated client class. Available options:

- `class_name`: Name of the generated client class
- `sdk_variables`: Automatically inject variables into endpoint paths from client initialization
</ParamField>

<ParamField path="default_bytes_stream_chunk_size" type="number" default="null" required={false} toc={true}>
Expand All @@ -32,6 +36,19 @@ groups:
<ParamField path="exclude_types_from_init_exports" type="bool" default="false" required={false} toc={true}>
</ParamField>

<ParamField path="extension_headers" type="object" default="{}" required={false} toc={true}>
Add custom extension headers to API requests. Headers can be specified in OpenAPI using `x-fern-sdk-variables`. For example:

```yaml
x-fern-sdk-variables:
project_id:
type: string
description: "The project ID to use for all requests"
```

The variable will be automatically injected into endpoint paths that contain the matching parameter name.
</ParamField>

<ParamField path="extra_dependencies" type="object" default="{}" required={false} toc={true}>
If you want to add custom dependencies to your generated SDK, you can specify them using this configuration. For example, to add a dependency on boto3, your config would look like:
```
Expand Down