# Wait for event
Source: https://www.inngest.com/docs/reference/python/steps/wait-for-event

Wait until the Inngest server receives a specific event.

If an event is received before the timeout then the event is returned. If the timeout is reached then `None` is returned.

## Arguments

<Properties>
    <Property name="step_id" required type="str">
        Step ID. Should be unique within the function.
    </Property>
    <Property name="event" required type="str">
        Name of the event to wait for.
    </Property>
    <Property name="if_exp" type="str | None">
        Only match events that match this CEL expression. For example, `"event.data.height == async.data.height"` will only match incoming events whose `data.height` matches the `data.height` value for the trigger event.
    </Property>
    <Property name="timeout" required type="int | datetime.timedelta">
        In milliseconds.
    </Property>
</Properties>

## Examples

```py
@inngest_client.create_function(
    fn_id="my_function",
    trigger=inngest.TriggerEvent(event="app/my_function"),
)
async def fn(ctx: inngest.Context) -> None:
    res = await ctx.step.wait_for_event(
        "wait",
        event="app/wait_for_event.fulfill",
        timeout=datetime.timedelta(seconds=2),
    )
```