open_hypersync_stream
Documentation for eth_defi.hypersync.session.open_hypersync_stream function.
- async open_hypersync_stream(client, query)
Open a Hypersync stream, dispatching correctly for both client types.
For
ThrottledHypersyncClient, callsstream(query)which builds ahypersync.StreamConfigfrom stored tuning parameters and logs them.For a native
hypersync.HypersyncClient, passes a bareStreamConfig()with all server defaults.Use this instead of calling
client.stream(query, config)directly so that tuning parameters are applied transparently.- Parameters
client (Union[hypersync.HypersyncClient, eth_defi.hypersync.session.ThrottledHypersyncClient]) – Either a native
HypersyncClientor aThrottledHypersyncClient.query (hypersync.Query) – The Hypersync query to stream.
- Return type
hypersync.QueryResponseStream