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

## Attribute Objects

```python theme={"dark"}
class Attribute(OntologyNestedElement, Generic[OptionType])
```

Base class for shared Attribute fields

#### dynamic

The `dynamic` member is part of every attribute. However it can only be true for top level (not nested) attributes
that are part of an [Object](/sdk-documentation/sdk-references/objects.ontology_object#object).

## RadioAttribute Objects

```python theme={"dark"}
class RadioAttribute(Attribute["NestableOption"])
```

An ontology attribute that allows selecting exactly one option
from a list of options.

Each option is represented by a `NestableOption`, which may itself
contain nested attributes (up to 7 levels deep).

#### add\_option

```python theme={"dark"}
def add_option(label: str,
               value: Optional[str] = None,
               local_uid: Optional[int] = None,
               feature_node_hash: Optional[str] = None) -> NestableOption
```

**Arguments**:

* `label` - user-visible name of the option
* `value` - internal unique value; optional; normally mechanically constructed from the label
* `local_uid` - integer identifier of the option. Normally auto-generated;
  omit this unless the aim is to create an exact clone of existing ontology
* `feature_node_hash` - global identifier of the option. Normally auto-generated;
  omit this unless the aim is to create an exact clone of existing ontology

**Returns**:

a `NestableOption` instance attached to the attribute. This can be further specified by adding nested attributes.

## ChecklistAttribute Objects

```python theme={"dark"}
class ChecklistAttribute(Attribute["FlatOption"])
```

An ontology attribute that allows selecting exactly one or more options
from a list of options.

#### add\_option

```python theme={"dark"}
def add_option(label: str,
               value: Optional[str] = None,
               local_uid: Optional[int] = None,
               feature_node_hash: Optional[str] = None) -> FlatOption
```

**Arguments**:

* `label` - user-visible name of the option
* `value` - internal unique value; optional; normally mechanically constructed from the label
* `local_uid` - integer identifier of the option. Normally auto-generated;
  omit this unless the aim is to create an exact clone of existing ontology
* `feature_node_hash` - global identifier of the option. Normally auto-generated;
  omit this unless the aim is to create an exact clone of existing ontology

**Returns**:

a `FlatOption` instance attached to the attribute.

## TextAttribute Objects

```python theme={"dark"}
class TextAttribute(Attribute["FlatOption"])
```

An ontology attribute that allows users to type text strings in a text field.

## NumericAttribute Objects

```python theme={"dark"}
class NumericAttribute(Attribute["FlatOption"])
```

An ontology attribute that allows users to type numerical values (float) in a numerical field.

#### attribute\_from\_dict

```python theme={"dark"}
def attribute_from_dict(d: Dict[str, Any]) -> Attribute
```

Convenience functions as you cannot call static member on union types.
