Skip to content

Entity

Part of Entities in the Python API reference.

Related guidance: concepts/entities, quickstarts/sensor-publisher, how-to/pli-entities, how-to/tracks-detections.

Runnable examples: publish_entity.py, watch_detections.py, watch_tracks.py.

from picogrid_ecn_client import Entity

Represent a timestamped entity and its current public attributes.

Entity(
*,
id: UUID,
category: EntityCategory,
integration: str,
recorded_at: datetime,
type: str,
fingerprint: str | None = None,
name: str | None = None,
status: EntityStatus = EntityStatus.UNKNOWN,
affiliation: Affiliation = Affiliation.UNKNOWN,
parent_id: UUID | None = None,
metadata: EntityMetadata = EntityMetadata(),
position: Location | None = None,
)

Source · models/entity.py

NameTypeRequiredDefaultConstraintsDescription
idUUIDyesCanonical UUID identifying the entity.
categoryEntityCategoryyesDomain category of the entity.
integrationstryesmin_length=2, max_length=128, pattern='^[A-Za-z0-9][A-Za-z0-9_-]{0,126}[A-Za-z0-9]$'Validated integration name that reports the entity.
recorded_atdatetimeyesTimezone-aware time when the entity state was recorded.
typestryesmin_length=1, max_length=128Source-defined entity type, from 1 through 128 characters.
fingerprintstr | NonenoNonemin_length=1, max_length=256Optional source-specific fingerprint, from 1 through 256 characters.
namestr | NonenoNonemin_length=1, max_length=256Optional reader-facing entity name, from 1 through 256 characters.
statusEntityStatusnoEntityStatus.UNKNOWNActivity state; defaults to UNKNOWN when unspecified.
affiliationAffiliationnoAffiliation.UNKNOWNReported affiliation; defaults to UNKNOWN when unspecified.
parent_idUUID | NonenoNoneOptional UUID of the entity that contains or owns this entity.
metadataEntityMetadatanoEntityMetadata()Display and JSON-valued extension metadata; defaults to empty metadata.
positionLocation | NonenoNoneOptional embedded Position Location Information for the entity.

Return the entity’s stable ID, integration, and optional fingerprint.

identity: EntityIdentity

Source · models/entity.py

Version 0.2.0 · branch main