#NEWLINE# def __download_file( self , obj_id , obj_name , local_path , chunk_size_kb = 10 ) : #NEWLINE# #INDENT# url = ( ( ( ( ( self . server + '/' ) + obj_name ) + '?id=' ) + str ( obj_id ) ) + '&downloadFile=true' ) #NEWLINE# r = requests . get ( url , headers = self . tokenHeaderJson , verify = self . sslVerify , stream = True ) #NEWLINE# r . raise_for_status ( ) #NEWLINE# n = 0 #NEWLINE# with open ( local_path , 'wb' ) as f : #NEWLINE# #INDENT# for chunk in r . iter_content ( chunk_size = ( chunk_size_kb * 1024 ) ) : #NEWLINE# #INDENT# if chunk : #NEWLINE# #INDENT# f . write ( chunk ) #NEWLINE# f . flush ( ) #NEWLINE# n += 1