Catalog Service
Overview
The Catalog service exposes three focused clients that mirror the server-side routers:
| Attribute | Description |
|---|---|
client.catalog.datasets | Dataset CRUD, schema management, and URN helpers |
client.catalog.containers | Container lifecycle and dataset membership |
client.catalog.secrets | Secret registration/listing tied to corpuser owners |
Each client accepts/returns the Pydantic models defined in kamiwaza_sdk/schemas/catalog.py, so responses are thread-safe and easy to validate.
Datasets
from kamiwaza_sdk import KamiwazaClient
from kamiwaza_sdk.schemas.catalog import DatasetCreate, DatasetUpdate
client = KamiwazaClient("https://localhost/api", api_key="...shh...")
# Create and immediately fetch the dataset metadata
payload = DatasetCreate(
name="/var/data/visitors.parquet",
platform="s3",
environment="PROD",
description="Daily visitor export",
properties={"region": "us-east-1", "endpoint": "http://localhost:19100"},
tags=["pii", "bronze"],
)
dataset_urn = client.catalog.datasets.create(payload)
dataset = client.catalog.datasets.get(dataset_urn)
# Update tags/properties via URN
client.catalog.datasets.update(
dataset_urn,
DatasetUpdate(tags=["pii", "silver"], properties={"region": "us-east-1"}),
)
# Fetch or update the logical schema
schema = client.catalog.datasets.get_schema(dataset_urn)
client.catalog.datasets.update_schema(dataset_urn, schema)
# Convenience wrappers for legacy code that previously called
# `client.catalog.create_dataset(...)` still work and delegate to the dataset client.