Skip to main content

prefect.server.events.clients

Classes

EventsClient

The abstract interface for a Prefect Events client Methods:

emit

NullEventsClient

A no-op implementation of the Prefect Events client for testing Methods:

client_name

emit

emit

Emit a single event

AssertingEventsClient

An implementation of the Prefect Events client that records all events sent to it for inspection during tests. Methods:

assert_emitted_event_count

Assert that the given number of events were emitted.

assert_emitted_event_with

Assert that an event was emitted containing the given properties.

assert_no_emitted_event_with

client_name

emit

emit

Emit a single event

emitted_events_count

reset

Reset all captured instances and their events. For use this between tests

PrefectServerEventsClient

Methods:

client_name

emit

emit

Emit a single event

PrefectServerEventsAPIClient

Methods:

pause_automation

resume_automation