# Event streams

Python inputs, results, permissions and executable examples for event streams.

Use this reference with the [complete developer tour](https://beepgrid.com/docs/sdks/python/tour.md) and [Python types](https://beepgrid.com/docs/sdks/python/types.md). The example at the end runs after the tour setup.

## events

Consume authorized canonical events with reconnect and a sequence checkpoint.

```text
events(self, **options: Any)
```

| Parameter | Type and default | Usage |
| --- | --- | --- |
| `**options` | `keyword fields` (default optional) | Optional fields supported by this operation, listed in the linked HTTP input. Unknown fields are not a supported extension mechanism. |

**Returns:** Python iterator or TypeScript async iterator of events; Go callback with error return.

**Permissions, lifecycle and errors:** Persist a checkpoint after applying each event. Go options add conversation filtering; Python supports conversation_id; TypeScript EventOptions exposes after, summary and signal. Summary streams omit full bodies. A denial stops reconnecting.

[Working Python example](https://beepgrid.com/docs/sdks/python/events/#example). Input/output fields are in the [types reference](https://beepgrid.com/docs/sdks/python/types.md).

## Example

Run this region after [the shared setup](https://beepgrid.com/docs/sdks/python/tour.md). Assertions check the returned data; the full tour is a runnable program.



```python
stream = billing.events()
try:
    for event in stream:
        if event['kind'] == 'message.created' and event.get('conversation_id') == sent['conversation_id']:
            checkpoint = event['sequence']  # Persist after your application applies this event.
            assert checkpoint > 0
            break
finally:
    stream.close()
```
