> ## 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.annotation.base annotation

## \_AnnotationMetadata Objects

```python theme={"dark"}
@dataclass
class _AnnotationMetadata()
```

Contains metadata information about an annotation (on a frame or a range)

#### created\_by

None defaults to the user of the SDK once uploaded to the server.

#### last\_edited\_by

None defaults to the user of the SDK once uploaded to the server.

#### from\_dict

```python theme={"dark"}
@staticmethod
def from_dict(
    d: BaseFrameObject | FrameClassification | ClassificationAnswer
) -> "_AnnotationMetadata"
```

Create a AnnotationInfo instance from a dictionary.

**Arguments**:

* `d` - A dictionary containing information about the annotation.

**Returns**:

* `AnnotationInfo` - An instance of AnnotationInfo.

#### update\_from\_optional\_fields

```python theme={"dark"}
def update_from_optional_fields(
        *,
        created_at: Optional[datetime] = None,
        created_by: Optional[str] = None,
        last_edited_at: Optional[datetime] = None,
        last_edited_by: Optional[str] = None,
        confidence: Optional[float] = None,
        manual_annotation: Optional[bool] = None,
        is_deleted: Optional[bool] = None,
        reviews: Optional[List[Dict[Any, Any]]] = None) -> None
```

Update the AnnotationInfo fields with the specified values.

**Arguments**:

* `created_at` - Optional creation time.
* `created_by` - Optional creator identifier.
* `last_edited_at` - Optional last edited time.
* `last_edited_by` - Optional last editor identifier.
* `confidence` - Optional confidence value.
* `manual_annotation` - Optional manual annotation flag.
* `reviews` - Optional list of reviews.
* `is_deleted` - Optional deleted flag.

## \_Annotation Objects

```python theme={"dark"}
class _Annotation(ABC)
```

Class providing common annotation properties.

#### frame

```python theme={"dark"}
@property
@abstractmethod
def frame() -> int
```

int: Gets the frame number.

**Notes**:

This is a legacy attribute. For new subclasses where frame
is not applicable (e.g. audio and text), this returns 0.

#### space

```python theme={"dark"}
@property
@abstractmethod
def space() -> Space
```

Get the space that this annotation is on.

#### created\_at

```python theme={"dark"}
@property
def created_at() -> datetime
```

Get the creation timestamp of the annotation.

#### created\_at

```python theme={"dark"}
@created_at.setter
def created_at(created_at: datetime) -> None
```

Set the creation timestamp of the annotation.

#### created\_by

```python theme={"dark"}
@property
def created_by() -> Optional[str]
```

Get the email of the user who created the annotation.

#### created\_by

```python theme={"dark"}
@created_by.setter
def created_by(created_by: Optional[str]) -> None
```

Set the creator email. None defaults to the current SDK user.

**Arguments**:

* `created_by` - User email or None to default to SDK user.

**Raises**:

* `ValueError` - If the email format is invalid.

#### last\_edited\_at

```python theme={"dark"}
@property
def last_edited_at() -> datetime
```

Get the last edited timestamp of the annotation.

#### last\_edited\_at

```python theme={"dark"}
@last_edited_at.setter
def last_edited_at(last_edited_at: datetime) -> None
```

Set the last edited timestamp of the annotation.

#### last\_edited\_by

```python theme={"dark"}
@property
def last_edited_by() -> Optional[str]
```

Get the email of the user who last edited the annotation.

#### last\_edited\_by

```python theme={"dark"}
@last_edited_by.setter
def last_edited_by(last_edited_by: Optional[str]) -> None
```

Set the last editor email. None defaults to the current SDK user.

**Arguments**:

* `last_edited_by` - User email or None to default to SDK user.

**Raises**:

* `ValueError` - If the email format is invalid.

#### confidence

```python theme={"dark"}
@property
def confidence() -> float
```

Get the confidence score of the annotation.

#### confidence

```python theme={"dark"}
@confidence.setter
def confidence(confidence: float) -> None
```

Set the confidence score of the annotation.

#### manual\_annotation

```python theme={"dark"}
@property
def manual_annotation() -> bool
```

Get whether this annotation was created manually.

#### manual\_annotation

```python theme={"dark"}
@manual_annotation.setter
def manual_annotation(manual_annotation: bool) -> None
```

Set whether this annotation was created manually.

## \_ObjectAnnotation Objects

```python theme={"dark"}
class _ObjectAnnotation(_Annotation)
```

Represents an object annotation on a Space.
Provides access to annotation metadata for a SpaceObject.

#### object\_hash

```python theme={"dark"}
@property
def object_hash() -> str
```

Get the hash of the object instance.

#### coordinates

```python theme={"dark"}
@property
@abstractmethod
def coordinates() -> Coordinates
```

coordinates: Gets the frame number.

**Notes**:

This is a legacy attribute. For new subclasses where coordinates
are not applicable, do not use this attribute. Instead, use `.ranges` instead (e.g. for audio or text spaces)

## \_ClassificationAnnotation Objects

```python theme={"dark"}
class _ClassificationAnnotation(_Annotation)
```

Represents a classification annotation on a Space.
Allows setting or getting annotation data for the Classification.

#### classification\_hash

```python theme={"dark"}
@property
def classification_hash() -> str
```

Get the hash of the object instance.
