list_namespaces(
self,
*,
prefix: NamespacePath | None = None,
suffix: NamespacePath | | 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: None |
limit | int | Default: 100 |
offset | int | Default: 0 |
List and filter namespaces in the store.
Used to explore the organization of data, find specific collections, or navigate the namespace hierarchy.
"Examples":
Setting max_depth=3. Given the namespaces:
# Example if you have the following namespaces:
# ("a", "b", "c")
# ("a", "b", "d", "e")
# ("a", "b", "d", "i")
# ("a", "b", "f")
# ("a", "c", "f")
store.list_namespaces(prefix=("a", "b"), max_depth=3)
# [("a", "b", "c"), ("a", "b", "d"), ("a", "b", "f")]Return namespaces up to this depth in the hierarchy. Namespaces deeper than this level will be truncated.
Maximum number of namespaces to return.
Number of namespaces to skip for pagination.