List namespaces with optional match conditions.
list_namespaces(
self,
prefix: list[str] | None = None,
suffix: list[str] | None = None,
max_depth: int | None = None,
limit: int = 100,
offset: int = 0,
headers: Mapping[str, str] | None = None,
params: QueryParamTypes | None = None
) -> ListNamespaceResponseclient = get_client(url="http://localhost:2024")
namespaces = await client.store.list_namespaces(
prefix=["documents"],
max_depth=3,
limit=10,
offset=0
)
print(namespaces)
----------------------------------------------------------------
[
["documents", "user123", "reports"],
["documents", "user456", "invoices"],
...
]| Name | Type | Description |
|---|---|---|
prefix | list[str] | None | Default: NoneOptional list of strings representing the prefix to filter namespaces. |
suffix | list[str] | None | Default: NoneOptional list of strings representing the suffix to filter namespaces. |
max_depth | int | None | Default: NoneOptional integer specifying the maximum depth of namespaces to return. |
limit | int | Default: 100Maximum number of namespaces to return (default is 100). |
offset | int | Default: 0Number of namespaces to skip before returning results (default is 0). |
headers | Mapping[str, str] | None | Default: NoneOptional custom headers to include with the request. |
params | QueryParamTypes | None | Default: NoneOptional query parameters to include with the request. |