Skip to main content

Overview

The Collate Python SDK provides entity-specific classes for reading and writing metadata. Each class — Tables, Databases, Users, etc. — shares the same CRUD interface and connects to a globally-configured client.

Installation

Tip: Match the SDK version to your Collate instance version.

Configuration

Call configure() once at startup — all entity class calls use it automatically. You can also read credentials from environment variables:

Global Functions

Entity references

Many metadata fields (owners, domains, etc.) expect EntityReference dicts rather than full entity objects. Use to_entity_reference() to convert:

BaseEntity Operations

All entity classes inherit these methods:

Bulk Create with Conflict Outcomes

TestCases.create_many() and GlossaryTerms.create_many() create several entities in one request and report an outcome for every input. Other entity classes do not provide this method.
Parameters:
  • requests: A list of the generated create requests, for example CreateGlossaryTermRequest.
  • on_conflict: How to report inputs whose fully qualified name already exists, or that repeat inside the request. The default is ConflictPolicy.skip.
Conflict policies:
  • ConflictPolicy.skip: Conflicting inputs are reported as skipped. All other valid inputs are created.
  • ConflictPolicy.fail: Conflicting inputs are reported as failed. All other valid inputs are still created. This is not an all-or-nothing request.
Existing and soft-deleted entities are never overwritten or restored. Result: create_many() returns a BulkCreateResult:
  • createdCount, skippedCount, and failedCount: Totals for the request.
  • results: One entry per input, in request order.
    • index: The zero-based position of the input in the request.
    • status: created, skipped, or failed.
    • fullyQualifiedName: The fully qualified name of the entity.
    • id: The ID of the new entity. Only present when status is created.
    • reason: ALREADY_EXISTS, DUPLICATE_IN_REQUEST, or VALIDATION_ERROR. Only present for skipped and failed inputs.
    • message: A readable explanation for skipped and failed inputs.
Request-level errors, such as missing permissions, still raise APIError. Bulk create requires a server that supports the onConflict parameter, so match the SDK version to your Collate version.

Entity Classes