#NEWLINE# @ retry ( stop_max_attempt_number = 3 ) #NEWLINE# def upload( self , destination_path , blob = None , local_path = None , no_cache = None , content_type = None ) : #NEWLINE# #INDENT# content_settings = azure . storage . blob . ContentSettings ( ) #NEWLINE# if no_cache : #NEWLINE# #INDENT# content_settings . cache_control = None #NEWLINE# #UNINDENT# if content_type : #NEWLINE# #INDENT# content_settings . content_type = content_type #NEWLINE# #UNINDENT# assert ( ( content_settings is None ) or ( blob is None ) ) #NEWLINE# if local_path : #NEWLINE# #INDENT# self . blob_service . create_blob_from_path ( self . container , destination_path , local_path , content_settings = content_settings , max_connections = 16 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert ( blob is not None ) #NEWLINE# assert isinstance ( blob , bytes ) #NEWLINE# self . blob_service . create_blob_from_text ( self . container , destination_path , blob , content_settings = content_settings , max_connections = 16 )