# Events Store (/sdks/python/reference/events-store)



Use `send_event_store` for persisted events and `subscribe_to_events_store` with `EventsStoreSubscription` to control replay semantics.

## send\_event\_store [#send_event_store]

```python
await client.send_event_store(message: EventStoreMessage) -> EventStoreResult
```

**Returns:** `EventStoreResult` — broker acknowledgement payload.

## subscribe\_to\_events\_store [#subscribe_to_events_store]

```python
async for event in client.subscribe_to_events_store(
    subscription: EventsStoreSubscription,
    cancellation_token: AsyncCancellationToken,
):  # yields EventStoreReceived
    ...
```

**EventsStoreSubscription** adds:

| Field                         | Type                      | Description                 |
| ----------------------------- | ------------------------- | --------------------------- |
| `events_store_type`           | `EventStoreStartPosition` | Replay start enum           |
| `events_store_sequence_value` | `int`                     | Sequence or timestamp value |

Start position values:

`StartFromNew`, `StartFromFirst`, `StartFromLast`, `StartAtSequence`, `StartAtTime`, `StartAtTimeDelta`.

## Quick Usage [#quick-usage]

```python title="events_store.py"
msg = EventStoreMessage(channel="audit", body=b"record")
result = await client.send_event_store(msg)
```

## See Also [#see-also]

* [Events Store Examples](/sdks/python/how-to/events-store/)
* [Events Store pattern](/learn/events-store/getting-started)
* [Python SDK Getting Started](/sdks/python)
