def streaming_bulk(client, actions, chunk_size=500, max_chunk_bytes=((100 * 1024) * 1024), raise_on_error=True, expand_action_callback=expand_action, raise_on_exception=True, **kwargs):
 actions = map(expand_action_callback, actions)
 for bulk_actions in _chunk_actions(actions, chunk_size, max_chunk_bytes, client.transport.serializer):
  for result in _process_bulk_chunk(client, bulk_actions, raise_on_exception, raise_on_error, **kwargs):
   (yield result)

def streaming_bulk ( client , actions , chunk_size = 500 , max_chunk_bytes = ( ( 100 * 1024 ) * 1024 ) , raise_on_error = True , expand_action_callback = expand_action , raise_on_exception = True , ** kwargs ) : actions = map ( expand_action_callback , actions ) for bulk_actions in _chunk_actions ( actions , chunk_size , max_chunk_bytes , client . transport . serializer ) : for result in _process_bulk_chunk ( client , bulk_actions , raise_on_exception , raise_on_error , ** kwargs ) : ( yield result )
streaming bulk consumes actions from the iterable passed in and yields results per action .