---
sidebar:
  hidden: true
title: roboto.domain.platform_events.once_per
---
## Module Contents

### OncePer

```python
class roboto.domain.platform_events.once_per.OncePer
```

`from roboto.domain.platform_events import OncePer`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/platform_events/once_per.py#L10-L34)

Bases: `roboto.compat.StrEnum`

A grain an event offers for deduplication: the occurrence itself, or an entity the event names.

This is an event's vocabulary, not a trigger's. Each [`PlatformEventType`](/reference/python-sdk/roboto/domain/platform_events/events#roboto.domain.platform_events.events.PlatformEventType) declares the grains it supports, and how an occurrence projects onto each, in its [`PlatformEventDescriptor`](/reference/python-sdk/roboto/domain/platform_events/catalog#roboto.domain.platform_events.catalog.PlatformEventDescriptor); that projection is what turns one occurrence into one idempotency token. A trigger only chooses among the grains its events offer, and its choice must be legal for every event type it subscribes to.

**Attributes**

- **OncePer.Dataset** = `'dataset'`: Fire once per dataset.
- **OncePer.Event** = `'event'`: Fire once per event, the annotation marking a span of time on your data.
- **OncePer.File** = `'file'`: Fire once per file.
- **OncePer.Invocation** = `'invocation'`: Fire once per action invocation.
- **OncePer.Occurrence** = `'occurrence'`: Fire on every occurrence; nothing collapses. Supported by every event type.
