singer_sdk.singerlib.catalog.Catalog

class singer_sdk.singerlib.catalog.Catalog[source]

Singer catalog mapping of stream entries.

classmethod from_dict(data)[source]

Create a catalog from a dictionary.

Parameters:

data (dict[str, list[dict[str, Any]]]) – A dictionary with the defined catalog streams.

Returns:

A catalog.

Return type:

Catalog

add_stream(entry)[source]

Add a stream entry to the catalog.

Parameters:

entry (CatalogEntry) – The stream entry to add.

Return type:

None

get_stream(stream_id)[source]

Retrieve a stream entry from the catalog.

Parameters:

stream_id (str) – The tap stream id of the stream to retrieve.

Returns:

The stream entry if found, otherwise None.

Return type:

CatalogEntry | None

to_dict()[source]

Return a dictionary representation of the catalog.

Returns:

A dictionary with the defined catalog streams.

Return type:

dict[str, Any]

property streams: Sequence[CatalogEntry][source]

Get catalog entries.

Returns:

A list of catalog entries.