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

# prj.publish_event

export const GCell = ({children, className}) => <div className={`grid-table-cell ${className || ""}`} role="cell">
    {children}
  </div>;

export const GTH = ({children, className}) => <div className={`grid-table-th ${className || ""}`} role="columnheader">
    {children}
  </div>;

export const GRow = ({children}) => <div className="grid-table-row" role="row">{children}</div>;

export const GBody = ({children}) => <div className="grid-table-body" role="rowgroup">{children}</div>;

export const GHead = ({children}) => <div className="grid-table-head" role="rowgroup">{children}</div>;

export const GTable = ({children, className, cols}) => <div className={`grid-table not-prose overflow-hidden rounded-2xl ${className || ""}`} style={{
  "--grid-table-cols": cols
}} role="table">
    {children}
  </div>;

Publish an event from a project flow.

```python theme={null}
prj.publish_event(name, payload=None)
```

Publish an event to trigger flows decorated with `@project_trigger`.

<GTable cols="12% 10% 78%">
  <GHead>
    <GRow>
      <GTH>Parameter</GTH>
      <GTH>Type</GTH>
      <GTH>Description</GTH>
    </GRow>
  </GHead>

  <GBody>
    <GRow>
      <GCell>`name`</GCell>
      <GCell>str</GCell>
      <GCell>Event name (must match the `event=` in a `@project_trigger`)</GCell>
    </GRow>

    <GRow>
      <GCell>`payload`</GCell>
      <GCell>dict</GCell>
      <GCell>JSON-serializable payload</GCell>
    </GRow>
  </GBody>
</GTable>

Events are namespaced as `prj.{project}.{branch}.{name}`, so events published on one branch only trigger flows deployed on the same branch.

```python theme={null}
self.prj.publish_event("model_trained", payload={"accuracy": 0.95})
```
