---
title: HookObservation
description: One lifecycle-hook invocation, as the daemon observed it.
---

```python
@final
class HookObservation
```

One lifecycle-hook invocation, as the daemon observed it.

## Constructor

`HookObservation` declares no `__new__` or `__init__`, so it is not constructed directly: an instance comes back from another call in this package.

## Properties

### `fired_at`

```python
fired_at: int
```

Seconds since the epoch on the daemon's clock when the hook arrived.

### `handler`

```python
handler: HandlerOutcome | None
```

The workload handler's outcome, or `None` when the image has no handler for
this hook.

### `hook`

```python
hook: str
```

`ready`, `validate`, `run`, `suspend`, `resume`, or `terminate`.

## Special methods

### `__repr__`

```python
def __repr__() -> str
```

## Provenance

This page is generated from `bindings/microvms-py/microvms.pyi` by Griffe 2.3.0, run from `site/scripts/gen-reference.mjs` on every `pnpm run sync`, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding's Rust source, then regenerate the declarations with `mise run stubs`. `mise run stubs:check` fails when the committed file no longer matches the source.