---
sidebar:
  label: roboto.domain.platform_events
  order: 12
title: roboto.domain.platform_events
---
Platform events: what happened to an entity on the platform, as a record.

Distinct from [`roboto.domain.events`](/docs/reference/python-sdk/roboto/domain/events), whose `Event` is a time-anchored annotation on robotics data. A platform event is emitted by the platform when a file is uploaded, a dataset is created, an invocation finishes, and so on. Triggers subscribe to them; outgoing integrations receive them as CloudEvents. The catalog describes each type: its payload model, the namespace roots it exposes, and the `once_per` values it supports.

## Submodules

- [roboto.domain.platform_events.catalog](/docs/reference/python-sdk/roboto/domain/platform_events/catalog)
- [roboto.domain.platform_events.events](/docs/reference/python-sdk/roboto/domain/platform_events/events)
- [roboto.domain.platform_events.once_per](/docs/reference/python-sdk/roboto/domain/platform_events/once_per)
- [roboto.domain.platform_events.samples](/docs/reference/python-sdk/roboto/domain/platform_events/samples)

## Package Contents

- [CLOUDEVENTS_SPECVERSION](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.CLOUDEVENTS_SPECVERSION) (data): `CLOUDEVENTS_SPECVERSION = '1.0'`. The CloudEvents spec version [`PlatformEvent.to_cloudevent()`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEvent.to_cloudevent) produces.

- [CLOUDEVENTS_TYPE_PREFIX](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.CLOUDEVENTS_TYPE_PREFIX) (data): `CLOUDEVENTS_TYPE_PREFIX = 'ai.roboto.'`. Reverse-DNS prefix CloudEvents recommends on `type`. It appears only in what [`PlatformEvent.to_cloudevent()`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEvent.to_cloudevent) returns; subscriptions, conditions, and templates name an event by its bare [`PlatformEventType`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType) value (`file.uploaded`).

- [DATASET_ROOT](/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.DATASET_ROOT) (data): `DATASET_ROOT = 'dataset'`. Namespace root naming a dataset. An event exposing it is about a dataset or about something within one, so a consumer may reach that dataset's files from the event.

- [DEFAULT_PLATFORM_EVENT_CATALOG](/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.DEFAULT_PLATFORM_EVENT_CATALOG) (data): The catalog of every [`PlatformEventType`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType), used wherever a caller does not supply its own (envelope payload binding, trigger validation, evaluation).

- [DatasetCreatedPayload](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.DatasetCreatedPayload) (class): Payload for [`PlatformEventType.DatasetCreated`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType.DatasetCreated).

- [DatasetMetadataUpdatedPayload](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.DatasetMetadataUpdatedPayload) (class): Payload for [`PlatformEventType.DatasetMetadataUpdated`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType.DatasetMetadataUpdated).

- [DatasetTagAddedPayload](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.DatasetTagAddedPayload) (class): Payload for [`PlatformEventType.DatasetTagAdded`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType.DatasetTagAdded).

- [ENVELOPE_ROOT](/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.ENVELOPE_ROOT) (data): `ENVELOPE_ROOT = 'envelope'`. Namespace root served from the platform event's own envelope: its id, source, subject, type, time, and org, plus the payload as published under `data`. Reserved: no event type may expose it as an entity root.

- [EventCreatedPayload](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.EventCreatedPayload) (class): Payload for [`PlatformEventType.EventCreated`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType.EventCreated).

- [FileIngestedPayload](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.FileIngestedPayload) (class): Payload for [`PlatformEventType.FileIngested`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType.FileIngested).

- [FileMetadataUpdatedPayload](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.FileMetadataUpdatedPayload) (class): Payload for [`PlatformEventType.FileMetadataUpdated`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType.FileMetadataUpdated).

- [FileUploadedPayload](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.FileUploadedPayload) (class): Payload for [`PlatformEventType.FileUploaded`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType.FileUploaded).

- [InvocationCompletedPayload](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.InvocationCompletedPayload) (class): Payload for [`PlatformEventType.InvocationCompleted`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType.InvocationCompleted).

- [InvocationFailedPayload](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.InvocationFailedPayload) (class): Payload for [`PlatformEventType.InvocationFailed`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType.InvocationFailed).

- [OncePer](/reference/python-sdk/roboto/domain/platform_events/once_per#roboto.domain.platform_events.once_per.OncePer) (class): A grain an event offers for deduplication: the occurrence itself, or an entity the event names.

- [OncePerProjection](/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.OncePerProjection) (data): Projects a [`PlatformEvent`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEvent) onto the token string that identifies what the trigger fires once per (e.g. the dataset id for `once_per=dataset`).

- [PlatformEvent](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEvent) (class): One occurrence of something that happened on the platform, as a trigger receives it.

- [PlatformEventCatalog](/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.PlatformEventCatalog) (class): Descriptors for platform event types, looked up by type.

- [PlatformEventDescriptor](/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.PlatformEventDescriptor) (class): Everything the trigger system knows about one platform event type.

- [PlatformEventPayload](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventPayload) (data): Union of every per-type payload model. Which member is legal for a given [`PlatformEvent`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEvent) is dictated by its [`type`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEvent.type).

- [PlatformEventType](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType) (class): A thing that happens on the platform that triggers can subscribe to.

- [RESERVED_ROOTS](/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.RESERVED_ROOTS) (data): Roots the evaluation namespace serves itself. A descriptor claiming one would be silently shadowed by the envelope or the trigger, so construction rejects it.

- [SAMPLE_ACTION_DIGEST](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_ACTION_DIGEST) (data): `SAMPLE_ACTION_DIGEST = 'sha256:9f1c2e7b4a0d8c6f3e5b1a7d2c4f8e6a0b3d5c7e9f1a2b4c6d8e0f2a4b6c8d0e'`

- [SAMPLE_ACTION_NAME](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_ACTION_NAME) (data): `SAMPLE_ACTION_NAME = 'ros-ingest'`

- [SAMPLE_API_DOMAIN](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_API_DOMAIN) (data): `SAMPLE_API_DOMAIN = 'api.roboto.ai'`

- [SAMPLE_CHANGESET](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_CHANGESET) (data)

- [SAMPLE_DATASET_ID](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_DATASET_ID) (data): `SAMPLE_DATASET_ID = 'ds_7h2k9m4qxp3w'`

- [SAMPLE_EVENT_ID](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_EVENT_ID) (data): `SAMPLE_EVENT_ID = 'ev_7g3n5kq2wxrd'`

- [SAMPLE_FILE_ID](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_FILE_ID) (data): `SAMPLE_FILE_ID = 'fl_q8v2n6ty4mcs'`

- [SAMPLE_FILE_VERSION](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_FILE_VERSION) (data): `SAMPLE_FILE_VERSION = 2`

- [SAMPLE_INVOCATION_ID](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_INVOCATION_ID) (data): `SAMPLE_INVOCATION_ID = 'iv_2x9pd7wk5rhf'`

- [SAMPLE_ORG_ID](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_ORG_ID) (data): `SAMPLE_ORG_ID = 'og_k3m8w2rq7nxd'`

- [SAMPLE_SESSION_ID](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_SESSION_ID) (data): `SAMPLE_SESSION_ID = 'se_m4t7c1zq9bvn'`

- [SAMPLE_TAGS_ADDED](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_TAGS_ADDED) (data): `SAMPLE_TAGS_ADDED = ['validated', 'nightly']`

- [SAMPLE_TIME](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_TIME) (data): The instant every sample event and record is dated from, so samples are stable across calls.

- [SAMPLE_TRANSACTION_ID](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_TRANSACTION_ID) (data): `SAMPLE_TRANSACTION_ID = 'tx_5jw8r3ne2kpq'`

- [SAMPLE_TRIGGER_ID](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_TRIGGER_ID) (data): `SAMPLE_TRIGGER_ID = 'tr_3nq7wk2mx9pd'`

- [SAMPLE_USER](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_USER) (data): `SAMPLE_USER = 'maria.chen@acme-robotics.com'`

- [ScheduleFiredPayload](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.ScheduleFiredPayload) (class): Payload for [`PlatformEventType.ScheduleFired`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType.ScheduleFired).

- [SessionIngestedPayload](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.SessionIngestedPayload) (class): Payload for [`PlatformEventType.SessionIngested`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType.SessionIngested).

- [TRIGGER_ROOT](/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.TRIGGER_ROOT) (data): `TRIGGER_ROOT = 'trigger'`. Namespace root describing the trigger being evaluated. Reserved for the consumer; no event type may expose it as an entity root.

- [UploadCompletedPayload](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.UploadCompletedPayload) (class): Payload for [`PlatformEventType.UploadCompleted`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType.UploadCompleted).

- [event_catalog_manifest()](/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.event_catalog_manifest) (function): The catalog as the web UI's TypeScript mirror reads it: per event type, its roots, default root, supported grains, subject type, and whether a trigger may subscribe.

- [platform_event_source()](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.platform_event_source) (function): Return the CloudEvents `source` for one org's events on one deployment.

- [sample_platform_event()](/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.sample_platform_event) (function): A valid, fully populated event of `event_type` from the sample scenario.
