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

# Project ontology.ontology

#### generate\_feature\_node\_hash

```python theme={"dark"}
def generate_feature_node_hash() -> str
```

Utility function to generate an 8-character hex string.

## Ontology Objects

```python theme={"dark"}
class Ontology()
```

This class is DEPRECATED. We recommend using [Ontology](/sdk-documentation/sdk-references/ontology#ontology)

#### from\_dict

```python theme={"dark"}
@classmethod
def from_dict(cls, ontology_dict: Dict)
```

Convert python dictionary too an [Ontology](/sdk-documentation/sdk-references/project_ontology.ontology#ontology) object.

**Arguments**:

* `ontology_dict` - The dictionary to convert.

#### add\_object

```python theme={"dark"}
def add_object(name: str, shape: ObjectShape) -> None
```

Add an [OntologyObject](/sdk-documentation/sdk-references/project_ontology.ontology_object#ontologyobject) to the ontology.

**Arguments**:

* `name` - A descriptive name of the object.
* `shape` - The shape of the object.

#### add\_classification

```python theme={"dark"}
def add_classification(name: str,
                       classification_type: ClassificationType,
                       required: bool,
                       options: Optional[Iterable[str]] = None) -> None
```

Add a classification to the ontology.

**Arguments**:

* `name` - A descriptive name of the classification.
* `classification_type` - The type of the classification.
* `required` - Indicate whether annotating this classification is required.
* `options` - Nested classification options.

#### to\_dict

```python theme={"dark"}
def to_dict() -> Dict
```

Convert the ontology object to a python dictionary.
