diff --git a/fern/products/sdks/overview/python/configuration.mdx b/fern/products/sdks/overview/python/configuration.mdx index ec8d1dde9..1c0eb6af7 100644 --- a/fern/products/sdks/overview/python/configuration.mdx +++ b/fern/products/sdks/overview/python/configuration.mdx @@ -5,7 +5,7 @@ description: Configuration options for the Fern Python SDK. You can customize the behavior of the Python SDK generator in `generators.yml`: -```yaml {7-9} +```yaml {7-10} default-group: local groups: local: @@ -13,6 +13,7 @@ groups: - name: fernapi/fern-python version: 0.7.1 config: + package_name: "your_package" client: class_name: "YourClient" ``` @@ -22,9 +23,6 @@ groups: - - - 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=):` @@ -34,7 +32,7 @@ groups: 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: - ``` + ```yaml config: extra_dependencies: boto3: 1.28.15 @@ -74,6 +72,23 @@ groups: + +Specifies the Python package name that users will import your generated client +from. + +For example, setting `package_name: "my_custom_package"` enables users to use +`my_custom_package import Client` to import your client: + +```yaml {7-10} +default-group: local +groups: + local: + generators: + - name: fernapi/fern-python + version: 0.7.1 + config: + package_name: "my_custom_package" +``` @@ -151,4 +166,32 @@ groups: 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. + + +### client + Configuration for the generated client class and file structure. + + ```yaml + config: + client: + filename: "my_client.py" + class_name: "MyClient" + exported_filename: "my_client.py" + exported_class_name: "MyClient" + ``` + + + The filename for the generated client file. + + + + The name of the generated client class. + + + + The filename of the exported client which will be used in code snippets. + + + + The name of the exported client class that will be used in code snippets. \ No newline at end of file