Skip to main content
Version: Next

Main Client

The DataHub Main Client provides a client for interacting with DataHub.

DataHubClient

class datahub.sdk.main_client.DataHubClient(*, server: str, token: str | None = None)

DataHubClient

class datahub.sdk.main_client.DataHubClient(*, config: DatahubClientConfig)

DataHubClient

class datahub.sdk.main_client.DataHubClient(*, graph: DataHubGraph)

Bases: object

Main client for interacting with DataHub.

This class provides the primary interface for interacting with DataHub, including entity management, search, and resolution capabilities.

The client can be initialized in three ways:

  1. With a server URL and optional token
  2. With a DatahubClientConfig object
  3. With an existing (legacy) DataHubGraph instance
  • Parameters:
    • server (Optional[str])
    • token (Optional[str])
    • graph (Optional[DataHubGraph]) –
    • config (Optional[DatahubClientConfig])

property assertions

property entities : EntityClient

classmethod from_env()

Initialize a DataHubClient from the environment variables or ~/.datahubenv file.

This will first check DATAHUB_GMS_URL and DATAHUB_GMS_TOKEN. If not present, it will read credentials from ~/.datahubenv. That file can be created using the datahub init command.

If you’re looking to specify the server/token in code, use the DataHubClient(server=…, token=…) constructor instead.

property lineage : LineageClient

property resolve

property search : SearchClient

property subscriptions

test_connection()

  • Return type:None