ThingItem
Class: warmhub.ThingItem
ThingItem(wref: str, name: str, kind: str, version: int, created_at: int, shape_name: 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, extra: JsonMapping = _empty(), raw: JsonMapping = _empty())A row from a list read (thing.head, query, search).
Thinner than ThingDetail: list rows carry no shape,
validated_shape or committer_wref. Hydrate with thing.get when
those are 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.
Methods
Section titled “Methods”as_dict
Section titled “as_dict”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.
Properties and attributes
Section titled “Properties and attributes”wrefDocumentation is not yet available.
nameDocumentation is not yet available.
kindOpen on the wire. NOT narrowed to a Literal — see the module docstring.
version
Section titled “version”versionDocumentation is not yet available.
created_at
Section titled “created_at”created_atDocumentation is not yet available.
shape_name
Section titled “shape_name”shape_name = NoneDocumentation is not yet available.
active
Section titled “active”active = NoneDocumentation is not yet available.
data = NoneThe user’s own shape fields. Keys are never transformed, in either
direction. See _decode for the enforcement point.
about_wref
Section titled “about_wref”about_wref = NoneDocumentation is not yet available.
affirmed_wrefs
Section titled “affirmed_wrefs”affirmed_wrefs = NonePinned target wrefs the assertion’s current version affirms. Assertions only; targets the reader cannot see are suppressed.
metadata
Section titled “metadata”metadata = NoneNot yet modelled field-by-field; carried through as a plain mapping.
extra = field(default_factory=_empty)Documentation is not yet available.
raw = field(default_factory=_empty)Documentation is not yet available.