events
Yield pushed event envelopes asynchronously until the server closes the socket. The
subscription must already be open, normally through an async with block.
Yield pushed event payloads until the server closes the socket.
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the subscription has not been opened with |
Example
async with client.subscribe([{"event": "pane.output"}]) as stream:
async for event in stream.events():
print(event["event"])
Source code in src/herdr_client/async_client/client.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |