> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moorcheh.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Namespaces

> List all namespaces using the Python client

## namespaces.list

Returns every namespace on this Moorcheh instance, including type, vector dimension, item count, and created time.

```python theme={null}
client.namespaces.list() -> dict[str, Any]
```

**API:** `GET /namespaces` — see [List namespaces](/on-prem/api-references/namespaces/list)

### Parameters

None.

**Returns:** `dict[str, Any]` — object with a `namespaces` array.

**Raises:** `MoorchehApiError` on non-2xx responses.

### Examples

```python List All Namespaces theme={null}
from moorcheh import MoorchehClient

with MoorchehClient("http://localhost:8080") as client:
    result = client.namespaces.list()

    for ns in result["namespaces"]:
        print(
            ns["namespace_name"],
            ns["type"],
            ns["item_count"],
            ns["created_at"],
        )
```

### Response Fields

| Field                           | Type           | Description                                       |
| ------------------------------- | -------------- | ------------------------------------------------- |
| `namespaces`                    | array          | List of namespace objects (empty when none exist) |
| `namespaces[].namespace_name`   | string         | Unique namespace name                             |
| `namespaces[].type`             | string         | `"text"` or `"vector"`                            |
| `namespaces[].vector_dimension` | number \| null | Fixed vector length for vector namespaces         |
| `namespaces[].item_count`       | number         | Items stored in this namespace                    |
| `namespaces[].created_at`       | string         | ISO 8601 UTC creation time                        |

### Error Handling

```python Error Handling Example theme={null}
from moorcheh import MoorchehClient, MoorchehApiError

with MoorchehClient("http://localhost:8080") as client:
    try:
        result = client.namespaces.list()
    except MoorchehApiError as e:
        print(e.status_code, e.body)
```

## Related Operations

* [Create Namespace](/on-prem/python-client/namespaces/create) — add a namespace
* [Delete Namespace](/on-prem/python-client/namespaces/delete) — remove a namespace
* [API: List namespaces](/on-prem/api-references/namespaces/list)
* [CLI: moorcheh namespace-list](/on-prem/cli/namespaces/list)
