diff --git a/fern/products/sdks/legacy/generators/python/configuration.mdx b/fern/products/sdks/legacy/generators/python/configuration.mdx index 11d3bec252..a1d4eb37a2 100644 --- a/fern/products/sdks/legacy/generators/python/configuration.mdx +++ b/fern/products/sdks/legacy/generators/python/configuration.mdx @@ -113,6 +113,21 @@ Define optional dependency groups that users can install with your package using Custom extras are merged with the built-in [`aiohttp` extra](/learn/sdks/legacy/generators/python/aiohttp-support) at generation time, so declaring your own extras won't clobber it. + +Declares `httpx`, the HTTP client the SDK depends on, as an optional dependency installed through a pip extra with this name. A plain install of your package then pulls in only Pydantic and `typing_extensions`, which suits users who only build or parse the generated models, such as [XML-encoded types](/learn/sdks/deep-dives/xml-encoded-types). Users who call the API install the extra: + +```yaml +config: + http_client_extra: client +``` + +```bash +pip install your-package[client] +``` + +`httpx` is also added to the built-in [`aiohttp` extra](/learn/sdks/legacy/generators/python/aiohttp-support), since the aiohttp transport requires it. Importing the client without either extra installed raises an `ImportError`. The value can't be `aiohttp`, and the option requires `lazy_imports` to stay enabled. When unset, `httpx` remains a required dependency. + + When enabled, generates a flatter package structure by reducing nested directories and modules.