> ## 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.ontology object

## Object Objects

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

#### uid

Deprecated. Please use feature\_node\_hash instead.

#### title

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

Returns the name of the object, used as the title.

#### children

```python theme={"dark"}
@property
def children() -> Sequence[OntologyElement]
```

Returns the attributes of the object as its children.

#### create\_instance

```python theme={"dark"}
def create_instance() -> ObjectInstance
```

Create a [ObjectInstance](/sdk-documentation/sdk-references/objects.ontology_object_instance#objectinstance) to be used with a label row.

**Returns**:

* `ObjectInstance` - An instance of the object to be used in labeling.

#### from\_dict

```python theme={"dark"}
@classmethod
def from_dict(cls, d: dict) -> Object
```

Create an Object from a dictionary.

**Arguments**:

* `d` - A dictionary representing the object.

**Returns**:

* `Object` - The created Object instance.

**Raises**:

* `TypeError` - If the shape in the dictionary is not recognized.

#### to\_dict

```python theme={"dark"}
def to_dict() -> Dict[str, Any]
```

Convert the Object to a dictionary.

**Returns**:

Dict\[str, Any]: The dictionary representation of the object.

#### add\_attribute

```python theme={"dark"}
def add_attribute(cls: Type[AttributeType],
                  name: str,
                  local_uid: Optional[int] = None,
                  feature_node_hash: Optional[str] = None,
                  required: bool = False,
                  dynamic: bool = False) -> AttributeType
```

Adds an attribute to the object.

**Arguments**:

* `cls` - The attribute type, one of `RadioAttribute`, `ChecklistAttribute`, `TextAttribute`.
* `name` - The user-visible name of the attribute.
* `local_uid` - Integer identifier of the attribute. Normally auto-generated;
  omit this unless the aim is to create an exact clone of an existing ontology.
* `feature_node_hash` - Global identifier of the attribute. Normally auto-generated;
  omit this unless the aim is to create an exact clone of an existing ontology.
* `required` - Whether the label editor would mark this attribute as 'required'.
* `dynamic` - Whether the attribute can have a different answer for the same object across different frames.

**Returns**:

* `AttributeType` - The created attribute that can be further specified with options, where appropriate.

**Raises**:

* `ValueError` - If the specified `local_uid` or `feature_node_hash` violate uniqueness constraints.
