Skip to content

Walk

stacrs.walk

walk(
    container: dict[str, Any],
) -> AsyncIterator[
    tuple[dict[str, Any], list[dict[str, Any]], list[dict[str, Any]]]
]

Recursively walks a STAC catalog or collection breadth-first.

Parameters:

  • container (dict[str, Any]) –

    A STAC catalog or collection.

Yields:

  • AsyncIterator[tuple[dict[str, Any], list[dict[str, Any]], list[dict[str, Any]]]]

    A three-tuple of the container, its children, and its items.

Examples:

>>> async for container, children, items in stacrs.walk(catalog):
...     ...