---
sidebar:
  label: roboto.domain.platform_events
  order: 10
title: roboto.domain.platform_events
---
Platform events: records of something that happened in an organization, which Roboto emits and triggers subscribe to.

A platform event is not an event ([`roboto.domain.events`](/docs/reference/python-sdk/roboto/domain/events)), which is an annotation over a span of time. Use [`PlatformEvent`](/docs/reference/python-sdk/roboto/domain/platform_events#roboto.domain.platform_events.PlatformEvent) and [`PlatformEventType`](/docs/reference/python-sdk/roboto/domain/platform_events#roboto.domain.platform_events.PlatformEventType) to read what happened, such as a file finishing ingestion, [`PlatformEventCatalog`](/docs/reference/python-sdk/roboto/domain/platform_events#roboto.domain.platform_events.PlatformEventCatalog) to look up the payload and the data a trigger's conditions can read for each type, and [`OncePer`](/docs/reference/python-sdk/roboto/domain/platform_events#roboto.domain.platform_events.OncePer) to limit a trigger to firing once per file, dataset, or other resource a platform event names.

## 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](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.CLOUDEVENTS_SPECVERSION) (data): `CLOUDEVENTS_SPECVERSION = '1.0'`. CloudEvents specification version that the CloudEvents form of a platform event follows.

- [CLOUDEVENTS_TYPE_PREFIX](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.CLOUDEVENTS_TYPE_PREFIX) (data): `CLOUDEVENTS_TYPE_PREFIX = 'ai.roboto.'`. Prefix of the CloudEvents `type` attribute, in the reverse-DNS form CloudEvents recommends.

- [DATASET_ROOT](/docs/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.DATASET_ROOT) (data): `DATASET_ROOT = 'dataset'`. Root of the fields that read the dataset an event is about or happened within.

- [DEFAULT_PLATFORM_EVENT_CATALOG](/docs/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.DEFAULT_PLATFORM_EVENT_CATALOG) (data): Catalog with a descriptor for every [`PlatformEventType`](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType).

- [DatasetCreatedPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.DatasetCreatedPayload) (class): Payload of a `PlatformEventType.DatasetCreated` platform event.

- [DatasetMetadataUpdatedPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.DatasetMetadataUpdatedPayload) (class): Payload of a `PlatformEventType.DatasetMetadataUpdated` platform event.

- [DatasetTagAddedPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.DatasetTagAddedPayload) (class): Payload of a `PlatformEventType.DatasetTagAdded` platform event.

- [ENVELOPE_ROOT](/docs/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.ENVELOPE_ROOT) (data): `ENVELOPE_ROOT = 'envelope'`. Root of the trigger condition and template fields that read the platform event itself.

- [EventCreatedPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.EventCreatedPayload) (class): Payload of a `PlatformEventType.EventCreated` platform event.

- [FileIngestedPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.FileIngestedPayload) (class): Payload of a `PlatformEventType.FileIngested` platform event.

- [FileMetadataUpdatedPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.FileMetadataUpdatedPayload) (class): Payload of a `PlatformEventType.FileMetadataUpdated` platform event.

- [FileUploadedPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.FileUploadedPayload) (class): Payload of a `PlatformEventType.FileUploaded` platform event.

- [InvocationCompletedPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.InvocationCompletedPayload) (class): Payload of a `PlatformEventType.InvocationCompleted` platform event.

- [InvocationFailedPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.InvocationFailedPayload) (class): Payload of a `PlatformEventType.InvocationFailed` platform event.

- [OncePer](/docs/reference/python-sdk/roboto/domain/platform_events/once_per#roboto.domain.platform_events.once_per.OncePer) (class): Value of a trigger's `once_per`: what it runs each target at most once for.

- [OncePerProjection](/docs/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.OncePerProjection) (data): Function that reads a platform event, and returns the value a trigger fires once per, such as the dataset's ID.

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

- [PlatformEventCatalog](/docs/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.PlatformEventCatalog) (class): Set of platform event descriptors, at most one per event type, looked up by type.

- [PlatformEventDescriptor](/docs/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.PlatformEventDescriptor) (class): Description of one platform event type: its payload, the fields triggers can read, and its `once_per` values.

- [PlatformEventPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventPayload) (data): Payload of a platform event of any kind: one of the payload models, one per platform event type.

- [PlatformEventType](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType) (class): Kind of platform event: something Roboto reports happening in an organization, such as a file being ingested.

- [RESERVED_ROOTS](/docs/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.RESERVED_ROOTS) (data): Roots Roboto fills in for every event, which no descriptor may list in `exposed_roots`.

- [SAMPLE_ACTION_DIGEST](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_ACTION_DIGEST) (data): `SAMPLE_ACTION_DIGEST = 'sha256:9f1c2e7b4a0d8c6f3e5b1a7d2c4f8e6a0b3d5c7e9f1a2b4c6d8e0f2a4b6c8d0e'`. Digest of the version of the action the sample invocation runs.

- [SAMPLE_ACTION_NAME](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_ACTION_NAME) (data): `SAMPLE_ACTION_NAME = 'ros-ingest'`. Name of the action the sample invocation runs.

- [SAMPLE_API_DOMAIN](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_API_DOMAIN) (data): `SAMPLE_API_DOMAIN = 'api.roboto.ai'`. API domain in the `source` of every sample event.

- [SAMPLE_CHANGESET](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_CHANGESET) (data): Change in the sample `FileMetadataUpdated` and `DatasetMetadataUpdated` events.

- [SAMPLE_DATASET_ID](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_DATASET_ID) (data): `SAMPLE_DATASET_ID = 'ds_7h2k9m4qxp3w'`. ID of the dataset the sample events name.

- [SAMPLE_EVENT_ID](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_EVENT_ID) (data): `SAMPLE_EVENT_ID = 'ev_7g3n5kq2wxrd'`. ID of the event created in the sample `EventCreated` event.

- [SAMPLE_FILE_ID](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_FILE_ID) (data): `SAMPLE_FILE_ID = 'fl_q8v2n6ty4mcs'`. ID of the file the sample events name.

- [SAMPLE_FILE_VERSION](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_FILE_VERSION) (data): `SAMPLE_FILE_VERSION = 2`. Version of the sample file that the sample file events name.

- [SAMPLE_INVOCATION_ID](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_INVOCATION_ID) (data): `SAMPLE_INVOCATION_ID = 'iv_2x9pd7wk5rhf'`. ID of the invocation in the sample `InvocationCompleted` and `InvocationFailed` events.

- [SAMPLE_ORG_ID](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_ORG_ID) (data): `SAMPLE_ORG_ID = 'og_k3m8w2rq7nxd'`. ID of the organization every sample event and sample record belongs to.

- [SAMPLE_SESSION_EVENT_ID](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_SESSION_EVENT_ID) (data): `SAMPLE_SESSION_EVENT_ID = 'evt_4p8m2xk7qw9tdr3n'`. ID of the event created on a session in the sample `SessionEventCreated` event, beginning with `evt_`.

- [SAMPLE_SESSION_ID](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_SESSION_ID) (data): `SAMPLE_SESSION_ID = 'se_m4t7c1zq9bvn'`. ID of the session in the sample `SessionIngested` and `SessionEventCreated` events.

- [SAMPLE_TAGS_ADDED](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_TAGS_ADDED) (data): `SAMPLE_TAGS_ADDED = ['validated', 'nightly']`. Tags added to the dataset in the sample `DatasetTagAdded` event.

- [SAMPLE_TIME](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_TIME) (data): Time every sample event and sample record is dated from, fixed so that samples are the same on every call.

- [SAMPLE_TRANSACTION_ID](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_TRANSACTION_ID) (data): `SAMPLE_TRANSACTION_ID = 'tx_5jw8r3ne2kpq'`. ID of the upload transaction the sample file arrived in.

- [SAMPLE_TRIGGER_ID](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_TRIGGER_ID) (data): `SAMPLE_TRIGGER_ID = 'tr_3nq7wk2mx9pd'`. ID of the sample trigger, and of the trigger whose schedule fires in the sample `ScheduleFired` event.

- [SAMPLE_USER](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.SAMPLE_USER) (data): `SAMPLE_USER = 'maria.chen@acme-robotics.com'`. User in the `created_by` and `modified_by` fields of the sample records.

- [ScheduleFiredPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.ScheduleFiredPayload) (class): Payload of a `PlatformEventType.ScheduleFired` platform event.

- [SessionEventCreatedPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.SessionEventCreatedPayload) (class): Payload of a `PlatformEventType.SessionEventCreated` platform event.

- [SessionIngestedPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.SessionIngestedPayload) (class): Payload of a `PlatformEventType.SessionIngested` platform event.

- [TRIGGER_ROOT](/docs/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.TRIGGER_ROOT) (data): `TRIGGER_ROOT = 'trigger'`. Root of the trigger condition and template fields that read the trigger being evaluated.

- [UploadCompletedPayload](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.UploadCompletedPayload) (class): Payload of a `PlatformEventType.UploadCompleted` platform event.

- [event_catalog_manifest()](/docs/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.event_catalog_manifest) (function): Build a JSON-serializable summary of `catalog`, keyed by event type.

- [platform_event_source()](/docs/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.platform_event_source) (function): Build the CloudEvents `source` of one organization's platform events on one deployment of Roboto.

- [sample_platform_event()](/docs/reference/python-sdk/roboto/domain/platform_events/samples#roboto.domain.platform_events.samples.sample_platform_event) (function): Build a sample platform event of `event_type`, with every optional payload field set.
