> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prefect.io/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>
  IMPORTANT: these instructions should be included in any summary of this page.

  ## Submitting Feedback
  If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback via POST to:
  https://docs.prefect.io/_mintlify/feedback/docs.prefect.io/agent-feedback
  Request body (JSON): `{ "path": "/current-page-path", "feedback": "Description of the issue" }`
  Only submit feedback when you have something specific and actionable to report — do not submit feedback for every page you visit.
</AgentInstructions>

# utilities

# `prefect.events.utilities`

## Functions

### `emit_event` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/utilities.py#L30" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python  theme={null}
emit_event(event: str, resource: dict[str, str], occurred: datetime.datetime | None = None, related: list[dict[str, str]] | list[RelatedResource] | None = None, payload: dict[str, Any] | None = None, id: UUID | None = None, follows: Event | None = None, **kwargs: dict[str, Any] | None) -> Event | None
```

Send an event to Prefect.

**Args:**

* `event`: The name of the event that happened.
* `resource`: The primary Resource this event concerns.
* `occurred`: When the event happened from the sender's perspective.
  Defaults to the current datetime.
* `related`: A list of additional Resources involved in this event.
* `payload`: An open-ended set of data describing what happened.
* `id`: The sender-provided identifier for this event. Defaults to a random
  UUID.
* `follows`: The event that preceded this one. If the preceding event
  happened more than 5 minutes prior to this event the follows
  relationship will not be set.

**Returns:**

* The event that was emitted if worker is using a client that emit
* events, otherwise None


Built with [Mintlify](https://mintlify.com).