## AttributeValueSchema


A single stored attribute value with an optional physical unit.


Usage

``` python
AttributeValueSchema()
```


Instances of this class are what you read and write when accessing resource properties or step parameters at runtime::

    well.properties.content.volume.value   # 10.0
    well.properties.content.volume.unit    # "uL"
    str(well.properties.content.volume)    # "10.0uL"

    # Mutate the value in-place (unit is preserved)
    well.properties.content.volume = 8.5

Attributes: value: The stored scalar value. Type is validated against the corresponding [AttributeTemplateSchema](AttributeTemplateSchema.md#recap.AttributeTemplateSchema) at write time. unit: Physical unit string, or `None` for dimensionless attributes. Preserved across value assignments.


## Methods

| Name | Description |
|----|----|
| [__str__()](#__str__) | Return `"<value><unit>"` when a unit is set, otherwise `str(value)`. |
| [coerce_scalar_value()](#coerce_scalar_value) | Allow constructing an [AttributeValueSchema](AttributeValueSchema.md#recap.AttributeValueSchema) from a bare scalar. |

------------------------------------------------------------------------


#### \_\_str\_\_()


Return `"<value><unit>"` when a unit is set, otherwise `str(value)`.


Usage

``` python
__str__()
```


------------------------------------------------------------------------


#### coerce_scalar_value()


Allow constructing an [AttributeValueSchema](AttributeValueSchema.md#recap.AttributeValueSchema) from a bare scalar.


Usage

``` python
coerce_scalar_value(data)
```


When *data* is not a `dict` (e.g. `AttributeValueSchema(42)`), it is wrapped as `{"value": data}` so the scalar becomes the `.value` field. Dict inputs pass through unchanged.
