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
Configuration
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.) expectEntityReference 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.
requests: A list of the generated create requests, for exampleCreateGlossaryTermRequest.on_conflict: How to report inputs whose fully qualified name already exists, or that repeat inside the request. The default isConflictPolicy.skip.
ConflictPolicy.skip: Conflicting inputs are reported asskipped. All other valid inputs are created.ConflictPolicy.fail: Conflicting inputs are reported asfailed. All other valid inputs are still created. This is not an all-or-nothing request.
create_many() returns a BulkCreateResult:
createdCount,skippedCount, andfailedCount: 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, orfailed.fullyQualifiedName: The fully qualified name of the entity.id: The ID of the new entity. Only present whenstatusiscreated.reason:ALREADY_EXISTS,DUPLICATE_IN_REQUEST, orVALIDATION_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.