#NEWLINE# def batch_read_further( self ) : #NEWLINE# #INDENT# url = self . api_url ( 'articles?_limit=5&_sort=title' ) #NEWLINE# resp = self . session . get ( url , auth = a . auth ) #NEWLINE# articles = resp . json ( ) [ 'data' ] #NEWLINE# urls = [ '/articles/{}' . format ( a [ 'id' ] ) for a in articles ] #NEWLINE# data = { #NEWLINE# #INDENT# 'defaults' : { #NEWLINE# #INDENT# 'method' : 'PATCH' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# for i in range ( 25 ) : #NEWLINE# #INDENT# request = { #NEWLINE# #INDENT# 'path' : urls [ ( i % len ( urls ) ) ] , #NEWLINE# 'body' : { #NEWLINE# #INDENT# 'read_position' : random . randint ( 0 , 10000 ) , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# data . setdefault ( 'requests' , [ ] ) . append ( request ) #NEWLINE# #UNINDENT# self . _run_batch ( data )