Skip to content

ThingItem

Class: warmhub.ThingItem

ThingItem(wref: str, name: str, kind: str, version: int, created_at: int, declared_shapes: tuple[str, ...] | None = None, validated_shapes: tuple[str, ...] | None = None, active: bool | None = None, data: PayloadT | None = None, about_wref: str | None = None, affirmed_wrefs: tuple[str, ...] | None = None, metadata: JsonMapping | None = None, collections: tuple[JsonMapping, ...] | None = None, extra: JsonMapping = _empty(), raw: JsonMapping = _empty())

A row from a list read (thing.head, query, search).

Thinner than ThingDetail: list rows carry no committer_wref. Hydrate with thing.get when it is needed.

Generic in its payload. ThingItem with no parameter is ThingItem[JsonMapping] — data is the raw JSON object. Pass into to a read and you get ThingItem[YourShape] instead; see shape_decoder. The parameter changes the static type of data and nothing else: no key is renamed at either setting.

as_dict()

The exact server payload as a plain, mutable, serializable dict.

Wire keys, wire nesting, no client naming applied — the same content as raw, in the form you can hand to dumps, mutate, or pass to code that demands a real dict. Built fresh on each call, so editing the result cannot reach the model.

wref

Documentation is not yet available.

name

Documentation is not yet available.

kind

Open on the wire. NOT narrowed to a Literal — see the module docstring.

version

Documentation is not yet available.

created_at

Documentation is not yet available.

declared_shapes = None

Version-pinned Shapes this version declares directly.

validated_shapes = None

Full version-pinned certificate closure. Present on a page read only when it was requested with include_validated_shapes.

active = None

Documentation is not yet available.

data = None

The user’s own shape fields. Keys are never transformed, in either direction. See _decode for the enforcement point.

about_wref = None

Documentation is not yet available.

affirmed_wrefs = None

Pinned target wrefs the assertion’s current version affirms. Assertions only; targets the reader cannot see are suppressed.

metadata = None

Not yet modelled field-by-field; carried through as a plain mapping.

collections = None

One entry per collection Shape in the certificate closure. Absent on a row that is not a collection. On a read whose body is incomplete (head data_mode none/summary) the entries classify without a memberCount.

extra = field(default_factory=_empty)

Documentation is not yet available.

raw = field(default_factory=_empty)

Documentation is not yet available.