def stream(self, filter_by=list(), *args, **kwargs):
        """ Yield a stream of blocks

            :param array filter_by: List of operations to filter for, e.g.
                vote, comment, transfer, transfer_to_vesting,
                withdraw_vesting, limit_order_create, limit_order_cancel,
                feed_publish, convert, account_create, account_update,
                witness_update, account_witness_vote, account_witness_proxy,
                pow, custom, report_over_production, fill_convert_request,
                comment_reward, curate_reward, liquidity_reward, interest,
                fill_vesting_withdraw, fill_order,
            :param int start: Start at this block
            :param int stop: Stop at this block
            :param str mode: We here have the choice between
                 * "head": the last block
                 * "irreversible": the block that is confirmed by 2/3 of all block producers and is thus irreversible!
        """
        if isinstance(filter_by, str):
            filter_by = [filter_by]

        for event in self.ops(*args, **kwargs):
            op_type, op = event['op']
            if not filter_by or op_type in filter_by:
                yield {
                    **op,
                    "type": op_type,
                    "timestamp": parse_time(event.get("timestamp")),
                    "block_num": event.get("block"),
                    "trx_id": event.get("trx_id"),
                }
def stream ( self , filter_by = list ( ) , * args , ** kwargs ) : if isinstance ( filter_by , str ) : filter_by = [ filter_by ] for event in self . ops ( * args , ** kwargs ) : op_type , op = event [ 'op' ] if not filter_by or op_type in filter_by : yield { ** op , "type" : op_type , "timestamp" : parse_time ( event . get ( "timestamp" ) ) , "block_num" : event . get ( "block" ) , "trx_id" : event . get ( "trx_id" ) , }
Yield a stream of blocks

            :param array filter_by: List of operations to filter for, e.g.
                vote, comment, transfer, transfer_to_vesting,
                withdraw_vesting, limit_order_create, limit_order_cancel,
                feed_publish, convert, account_create, account_update,
                witness_update, account_witness_vote, account_witness_proxy,
                pow, custom, report_over_production, fill_convert_request,
                comment_reward, curate_reward, liquidity_reward, interest,
                fill_vesting_withdraw, fill_order,
            :param int start: Start at this block
            :param int stop: Stop at this block
            :param str mode: We here have the choice between
                 * "head": the last block
                 * "irreversible": the block that is confirmed by 2/3 of all block producers and is thus irreversible!