Skip to main content

prefect.server.events.schemas.events

Functions

matches

Returns true if the given value matches the expected string. Args:
  • expected: A glob pattern to match against; if it starts with an !, the pattern is negated.
  • value: The value of the label.

Classes

Resource

An observable business object of interest to the user Methods:

as_label_value_array

enforce_maximum_labels

get

has_all_labels

id

items

keys

labels

name

prefect_object_id

Extracts the UUID from an event’s resource ID if it’s the expected kind of prefect resource

requires_resource_id

RelatedResource

A Resource with a specific role in an Event Methods:

enforce_maximum_labels

id

name

prefect_object_id

Extracts the UUID from an event’s resource ID if it’s the expected kind of prefect resource

requires_resource_id

requires_resource_role

role

Event

The client-side view of an event that has happened to a Resource Methods:

find_resource_label

Finds the value of the given label in this event’s resource or one of its related resources. If the label starts with related:<role>:, search for the first matching label in a related resource with that role.

involved_resources

model_validate_list

receive

reset_fields

Reset the fields of the model that are in the _reset_fields set. Returns:
  • A new instance of the model with the reset fields.

resource_in_role

Returns a mapping of roles to the first related resource in that role

resources_in_role

Returns a mapping of roles to related resources in that role

size_bytes

ReceivedEvent

The server-side view of an event that has happened to a Resource after it has been received by the server Methods:

as_database_resource_rows

as_database_row

is_set

set

Set the flag, notifying all waiters. Unlike asyncio.Event, waiters may not be notified immediately when this is called; instead, notification will be placed on the owning loop of each waiter for thread safety.

url

Returns the UI URL for this event, allowing users to link to events in automation templates without parsing date strings.

wait

Block until the internal flag is true. If the internal flag is true on entry, return True immediately. Otherwise, block until another set() is called, then return True.

ResourceSpecification

Methods:

deepcopy

get

includes

items

matches

matches_every_resource

matches_every_resource_of_kind

pop

EventPage

A single page of events returned from the API, with an optional link to the next page of results Methods:

model_validate_list

reset_fields

Reset the fields of the model that are in the _reset_fields set. Returns:
  • A new instance of the model with the reset fields.

EventCount

The count of events with the given filter value Methods:

model_validate_list

reset_fields

Reset the fields of the model that are in the _reset_fields set. Returns:
  • A new instance of the model with the reset fields.