# Event

## class nominal.core.Event(rid, asset_rids, name, description, start, duration, properties, labels, type, is_archived, disposition)

Bases: `HasRid`, `RefreshableGrpcMixin`[`Event`]

An annotation at a point or interval in time, optionally associated with assets.

### rid: str

### asset_rids: Sequence[str]

### name: str

### description: str

### start: IntegralNanosecondsUTC

### duration: IntegralNanosecondsDuration

### properties: NominalProperties

### labels: Sequence[str]

### type: EventType

### is_archived: bool

### disposition: EventDisposition | None

None until the event is opened for disposition.

Checklist-fired events are opened automatically. Any event can be opened.

### archive()

Archives the event, preventing it from showing up in workbooks.

> **Note**
>
> This does not update the instance in place; call [`refresh()`](https://dev.nominal.io/python/ref/generated/nominal.core.Event.md#nominal.core.Event.refresh "nominal.core.Event.refresh") to see the change reflected.

### refresh()

Return type:
:   [*Self*](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.15)")

### unarchive()

Unarchives the event, allowing it to show up in workbooks.

> **Note**
>
> This does not update the instance in place; call [`refresh()`](https://dev.nominal.io/python/ref/generated/nominal.core.Event.md#nominal.core.Event.refresh "nominal.core.Event.refresh") to see the change reflected.

### update(*, name=None, description=None, assets=None, start=None, duration=None, properties=None, labels=None, type)

Replace event metadata, updating the current instance and returning it.

Metadata is replaced rather than appended. To add to labels or properties, merge them before
calling. E.g.:

```python
new_labels = ["new-label-a", "new-label-b"]
for old_label in event.labels:
    new_labels.append(old_label)
event = event.update(labels=new_labels)
```

Parameters:
:   - **name** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* *None*)

      New name for the event.
    - **description** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* *None*)

      New description for the event.
    - **assets** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.15)")*[*[*Asset*](https://dev.nominal.io/python/ref/generated/nominal.core.Asset.md#nominal.core.Asset "nominal.core.asset.Asset") *|* [*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*]* *|* *None*)

      Assets or asset rids the event applies to. An empty sequence clears them.
    - **start** ([*datetime*](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.15)") *|* [*int*](https://docs.python.org/3/builtins/functions.html#int "(in Python v3.15)") *|* *None*)

      New starting timestamp for the event.
    - **duration** ([*timedelta*](https://docs.python.org/3/library/datetime.html#datetime.timedelta "(in Python v3.15)") *|* [*int*](https://docs.python.org/3/builtins/functions.html#int "(in Python v3.15)") *|* *None*)

      New duration for the event.
    - **properties** ([*Mapping*](https://docs.python.org/3/library/typing.html#typing.Mapping "(in Python v3.15)")*[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*,* [*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* [*float*](https://docs.python.org/3/builtins/functions.html#float "(in Python v3.15)")*]* *|* *None*)

      String or numeric properties. Integers are stored as floats.
      None leaves properties unchanged; an empty mapping clears them.
    - **labels** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.15)")*[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*]* *|* *None*)

      Labels replacing the existing ones. An empty sequence clears them.
    - **type** ([*EventType*](https://dev.nominal.io/python/ref/generated/nominal.core.EventType.md#nominal.core.EventType "nominal.core._event_types.EventType") *|* *None*)

      New verbosity level for the event.

Returns:
:   This event, updated in place.

Return type:
:   [*Self*](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.15)")

> **Note**
>
> Every argument left as None is omitted from the request and the corresponding field is left
> unchanged. That is distinct from passing an empty collection, which clears the field.

Raises:
:   - [**TypeError**](https://docs.python.org/3/builtins/exceptions.html#TypeError "(in Python v3.15)") – If a property value is a boolean or is not a string, integer, or float.
    - [**ValueError**](https://docs.python.org/3/builtins/exceptions.html#ValueError "(in Python v3.15)") – If the backend does not echo back exactly one updated event.
    - [**NominalError**](https://dev.nominal.io/python/ref/generated/nominal.exceptions.NominalError.md#nominal.exceptions.NominalError "nominal.exceptions.NominalError") – If the update request fails.

Return type:
:   [*Self*](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.15)")
