List and filter namespaces in the store asynchronously.
Used to explore the organization of data, find specific collections, or navigate the namespace hierarchy.
alist_namespaces(
self,
*,
prefix: NamespacePath | None = None,
suffix: NamespacePath | None = None,
max_depth: int | None = None,
limit: int = 100,
offset: int = 0
) -> list[tuple[str, ...]]Setting max_depth=3 with existing namespaces:
# Given the following namespaces:
# ("a", "b", "c")
# ("a", "b", "d", "e")
# ("a", "b", "d", "i")
# ("a", "b", "f")
# ("a", "c", "f")
await store.alist_namespaces(prefix=("a", "b"), max_depth=3)
# Returns: [("a", "b", "c"), ("a", "b", "d"), ("a", "b", "f")]| Name | Type | Description |
|---|---|---|
prefix | NamespacePath | None | Default: NoneFilter namespaces that start with this path. |
suffix | NamespacePath | None | Default: NoneFilter namespaces that end with this path. |
max_depth | int | None | Default: NoneReturn namespaces up to this depth in the hierarchy. Namespaces deeper than this level will be truncated to this depth. |
limit | int | Default: 100Maximum number of namespaces to return. |
offset | int | Default: 0Number of namespaces to skip for pagination. |