events
Yield pushed event envelopes until the server closes the socket. The subscription must
already be open, normally through a 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
with client.subscribe([{"event": "pane.output"}]) as stream:
for event in stream.events():
print(event["event"])
Source code in src/herdr_client/sync/client.py
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |