docs/v3/api-ref/python/prefect-server-events-storage-__init__.mdx
prefect.server.events.storageto_page_token <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/storage/__init__.py#L19" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>to_page_token(filter: 'EventFilter', count: int, page_size: int, current_offset: int) -> Optional[str]
from_page_token <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/storage/__init__.py#L37" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>from_page_token(page_token: str) -> Tuple['EventFilter', int, int, int]
process_time_based_counts <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/storage/__init__.py#L56" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>process_time_based_counts(filter: 'EventFilter', time_unit: TimeUnit, time_interval: float, counts: List[EventCount]) -> List[EventCount]
Common logic for processing time-based counts across different event backends.
When doing time-based counting we want to do two things:
InvalidTokenError <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/storage/__init__.py#L15" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>QueryRangeTooLarge <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/storage/__init__.py#L98" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>