Install & Compatibility
Where this runs
tested against v0.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 41.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 6.3s · import 0.000s · 43MB
41MB installed
● package 41MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
UnityCatalogClient
✓ from unitycatalog import UnityCatalogClient
✗ from unitycatalog import UnityCatalogClient
This quickstart demonstrates how to initialize the `UnityCatalogClient` and list all available catalogs. It relies on `DATABRICKS_HOST` and `DATABRICKS_TOKEN` environment variables for authentication, which must be set for the client to connect successfully.
import os
from unitycatalog_client import UnityCatalogClient
# To run this code, set the following environment variables:
# os.environ['DATABRICKS_HOST'] = 'https://<your-databricks-host>'
# os.environ['DATABRICKS_TOKEN'] = 'dapi...' # A Databricks personal access token
try:
# The client automatically picks up DATABRICKS_HOST and DATABRICKS_TOKEN
# from environment variables if not provided explicitly.
client = UnityCatalogClient()
print("Attempting to list catalogs in Unity Catalog...")
catalogs = client.list_catalogs()
if catalogs:
print(f"Successfully retrieved {len(catalogs)} catalogs:")
for catalog in catalogs:
print(f"- Name: {catalog.name}, Full Name: {catalog.full_name}")
else:
print("No catalogs found or accessible.")
except Exception as e:
print(f"An error occurred: {e}")
print("Please ensure DATABRICKS_HOST and DATABRICKS_TOKEN environment variables are set and valid,")
print("and that your token has permissions to list catalogs.")
Debug
Known issues
breakingAs the library is pre-1.0 (currently v0.4.1), its API surface, including method signatures, return types, and available models, may change in minor or even patch releases without strictly adhering to semantic versioning for breaking changes.fixRefer to the GitHub release notes and official documentation when upgrading to a new version, and thoroughly test your integrations.
affects: All versions < 1.0.0
gotchaAuthentication requires `DATABRICKS_HOST` and `DATABRICKS_TOKEN` to be set as environment variables or passed directly to the `UnityCatalogClient` constructor. Incorrect or missing credentials will result in authentication failures.fixEnsure `DATABRICKS_HOST` (e.g., `https://workspace.cloud.databricks.com`) and `DATABRICKS_TOKEN` (a Databricks personal access token) are correctly configured in your environment or passed explicitly during client instantiation.
affects: All versions
gotchaWhen operating within a Databricks environment (e.g., notebooks, jobs) or if you are already using `databricks-sdk`, you can leverage its authentication context to instantiate `UnityCatalogClient`. Not knowing this integration path can lead to redundant credential management.fixTo use existing `databricks-sdk` authentication, instantiate the client like this: `from databricks.sdk import WorkspaceClient; from unitycatalog_client import UnityCatalogClient; client = UnityCatalogClient(api_client=WorkspaceClient().api_client)`.
affects: All versions
Upgrade
Version history
0.6.0latest on PyPI · released Aug 20, 2026
Audit
Dependencies
pydanticrequiredUsed for data model validation and parsing API responses.
requestsrequiredFor making HTTP requests to the Unity Catalog API.