Skip to content

Feature Request: Add client-level proxy configuration support (parity with Java SDK) #1234

@venkatesh-mothe

Description

@venkatesh-mothe

Summary

The Python SDK currently lacks client-level proxy configuration, requiring users to set global environment variables (HTTP_PROXY/HTTPS_PROXY) which affects all HTTP traffic in the application. This is problematic when only Databricks API calls need to be routed through a proxy.

Use Case

In enterprise environments, Databricks workspaces are often accessible only through specific proxy servers, while other services in the same application should not use the proxy. Setting environment variables globally is not a viable solution because:

  1. It affects all HTTP clients in the application
  2. It's not thread-safe when multiple clients need different proxy configurations
  3. It doesn't allow for proxy authentication without exposing credentials in environment variables

Proposed Solution

Add proxy configuration parameters to the Config class, similar to the Java SDK implementation:

from databricks.sdk import WorkspaceClient
from databricks.sdk.core import Config

config = Config(
    host="https://adb-xxx.databricks.com",
    client_id="...",
    client_secret="...",
    proxy_url="http://proxy-host:port",
    proxy_auth_type="BASIC",  # or "SPNEGO"
    proxy_username="user",
    proxy_password="pass"
)

client = WorkspaceClient(config=config)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions