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

# Objects.spaces.base space

## Space Objects

```python theme={"dark"}
class Space(ABC, Generic[ObjectAnnotationT, ClassificationAnnotationT,
                         ClassificationOverlapStrategyT])
```

Manages the objects on a space within LabelRowV2.
Users should not instantiate this class directly, but must obtain these instances via LabelRow\.list\_spaces().

#### get\_object\_instances

```python theme={"dark"}
def get_object_instances() -> list[ObjectInstance]
```

Get all object instances in the space.

**Returns**:

* `list[ObjectInstance]` - List of all object instances present in the space.

#### get\_classification\_instances

```python theme={"dark"}
def get_classification_instances() -> list[ClassificationInstance]
```

Get all classification instances in the space.

**Returns**:

* `list[ClassificationInstance]` - List of all classification instances present in the space.

#### get\_annotations

```python theme={"dark"}
def get_annotations(
    type_: Literal["object", "classification"],
    filter_instance_hashes: Optional[list[str]] = None
) -> Iterator[Union[ObjectAnnotationT, ClassificationAnnotationT,
                    _GlobalClassificationAnnotation]]
```

Get annotations in the space by type.

This method retrieves all annotations of a specified type (object or classification)
within the space. Annotations are returned as an iterator and created lazily as the
iterator is consumed.

**Arguments**:

* `type_` - The type of annotations to retrieve. Must be either:
  * "object": Returns object annotations
  * "classification": Returns classification annotations (including global classifications)
* `filter_instance_hashes` - Optional list of instance hashes to filter by.
  If provided, only annotations matching these hashes will be returned.
  For objects, these should be object hashes; for classifications, classification hashes.

**Returns**:

When type\_ is "object":

* `Iterator[ObjectAnnotationT]` - Iterator over object annotations in the space.
  The concrete annotation type depends on the Space subclass.

  When type\_ is "classification":
  Iterator\[Union\[ClassificationAnnotationT, \_GlobalClassificationAnnotation]]:
  Iterator over classification annotations, including global classifications.
