houndcore.app package¶
Subpackages¶
Submodules¶
houndcore.app.dispatcher module¶
- class houndcore.app.dispatcher.Dispatcher[source]¶
Bases:
objectthe event manager (dispatcher)
- async handle_event(context: EthSubscriptionContext[LogsSubscription, EthSubscriptionResult] | EthSubscriptionContext[PendingTxSubscription, HexBytes | TxData]) None[source]¶
handles any new events
- Parameters:
context (Union[web3.utils.PendingTxSubscriptionContext, web3.utils.LogsSubscriptionContext]) – the event context
- poll(sub_id: str, limit: int) List[EthSubscriptionContext[LogsSubscription, EthSubscriptionResult] | EthSubscriptionContext[PendingTxSubscription, HexBytes | TxData]] | None[source]¶
poll any new events using the subscription id
- Parameters:
sub_id (str) – the subscription id
limit (int) – the limit of returned results
- Returns:
Union[List[Context], None]