Skip to content

CatalogProtocol

kedro.io.CatalogProtocol

Bases: Protocol[_C, _DS]

_datasets instance-attribute

_datasets

__contains__

__contains__(ds_name)

Check if a dataset is in the catalog.

Source code in kedro/io/core.py
950
951
952
def __contains__(self, ds_name: str) -> bool:
    """Check if a dataset is in the catalog."""
    ...

__getitem__

__getitem__(ds_name)

Get a dataset by name from an internal collection of datasets.

Source code in kedro/io/core.py
970
971
972
def __getitem__(self, ds_name: str) -> _DS:
    """Get a dataset by name from an internal collection of datasets."""
    ...

__iter__

__iter__()

Returns an iterator for the object.

Source code in kedro/io/core.py
966
967
968
def __iter__(self) -> Iterator[str]:
    """Returns an iterator for the object."""
    ...

__repr__

__repr__()

Returns the canonical string representation of the object.

Source code in kedro/io/core.py
946
947
948
def __repr__(self) -> str:
    """Returns the canonical string representation of the object."""
    ...

__setitem__

__setitem__(key, value)

Adds dataset using the given key as a dataset name and the provided data as the value.

Source code in kedro/io/core.py
974
975
976
def __setitem__(self, key: str, value: Any) -> None:
    """Adds dataset using the given key as a dataset name and the provided data as the value."""
    ...

confirm

confirm(name)

Confirm a dataset by its name.

Source code in kedro/io/core.py
 999
1000
1001
def confirm(self, name: str) -> None:
    """Confirm a dataset by its name."""
    ...

exists

exists(name)

Checks whether registered dataset exists by calling its exists() method.

Source code in kedro/io/core.py
1003
1004
1005
def exists(self, name: str) -> bool:
    """Checks whether registered dataset exists by calling its `exists()` method."""
    ...

from_config classmethod

from_config(catalog)

Create a catalog instance from configuration.

Source code in kedro/io/core.py
978
979
980
981
@classmethod
def from_config(cls, catalog: dict[str, dict[str, Any]] | None) -> _C:
    """Create a catalog instance from configuration."""
    ...

get

get(key, fallback_to_runtime_pattern=False)

Get a dataset by name from an internal collection of datasets.

Source code in kedro/io/core.py
983
984
985
def get(self, key: str, fallback_to_runtime_pattern: bool = False) -> _DS | None:
    """Get a dataset by name from an internal collection of datasets."""
    ...

items

items()

List all dataset names and datasets registered in the catalog.

Source code in kedro/io/core.py
962
963
964
def items(self) -> List[tuple[str, _DS]]:  # noqa: UP006
    """List all dataset names and datasets registered in the catalog."""
    ...

keys

keys()

List all dataset names registered in the catalog.

Source code in kedro/io/core.py
954
955
956
def keys(self) -> List[str]:  # noqa: UP006
    """List all dataset names registered in the catalog."""
    ...

load

load(name, version=None)

Load data from a registered dataset.

Source code in kedro/io/core.py
991
992
993
def load(self, name: str, version: str | None = None) -> Any:
    """Load data from a registered dataset."""
    ...

release

release(name)

Release any cached data associated with a dataset.

Source code in kedro/io/core.py
995
996
997
def release(self, name: str) -> None:
    """Release any cached data associated with a dataset."""
    ...

save

save(name, data)

Save data to a registered dataset.

Source code in kedro/io/core.py
987
988
989
def save(self, name: str, data: Any) -> None:
    """Save data to a registered dataset."""
    ...

values

values()

List all datasets registered in the catalog.

Source code in kedro/io/core.py
958
959
960
def values(self) -> List[_DS]:  # noqa: UP006
    """List all datasets registered in the catalog."""
    ...