def streaming_change_generator(namespace, poll_interval, timeout, transaction_pointer, exclude_types=None, include_types=None, exclude_folders=True, exclude_metadata=True, exclude_account=True, expand=False, is_n1=False):
 encoder = APIEncoder(is_n1=is_n1)
 start_time = time.time()
 while ((time.time() - start_time) < timeout):
  with session_scope(namespace.id) as db_session:
   (deltas, new_pointer) = format_transactions_after_pointer(namespace, transaction_pointer, db_session, 100, exclude_types, include_types, exclude_folders, exclude_metadata, exclude_account, expand=expand, is_n1=is_n1)
  if ((new_pointer is not None) and (new_pointer != transaction_pointer)):
   transaction_pointer = new_pointer
   for delta in deltas:
    (yield (encoder.cereal(delta) + '\n'))
  else:
   (yield '\n')
   gevent.sleep(poll_interval)

def streaming_change_generator ( namespace , poll_interval , timeout , transaction_pointer , exclude_types = None , include_types = None , exclude_folders = True , exclude_metadata = True , exclude_account = True , expand = False , is_n1 = False ) : encoder = APIEncoder ( is_n1 = is_n1 ) start_time = time . time ( ) while ( ( time . time ( ) - start_time ) < timeout ) : with session_scope ( namespace . id ) as db_session : ( deltas , new_pointer ) = format_transactions_after_pointer ( namespace , transaction_pointer , db_session , 100 , exclude_types , include_types , exclude_folders , exclude_metadata , exclude_account , expand = expand , is_n1 = is_n1 ) if ( ( new_pointer is not None ) and ( new_pointer != transaction_pointer ) ) : transaction_pointer = new_pointer for delta in deltas : ( yield ( encoder . cereal ( delta ) + '\n' ) ) else : ( yield '\n' ) gevent . sleep ( poll_interval )
poll the transaction log for the given namespace_id until timeout expires .