#NEWLINE# def purge( self , docs ) : #NEWLINE# #INDENT# 'Perform purging (complete removing) of the given documents.\n\n        Uses a single HTTP request to purge all given documents. Purged\n        documents do not leave any meta-data in the storage and are not\n        replicated.\n        ' #NEWLINE# content = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for doc in docs : #NEWLINE# #INDENT# if isinstance ( doc , dict ) : #NEWLINE# #INDENT# content [ doc [ '_id' ] ] = [ doc [ '_rev' ] ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if hasattr ( doc , 'items' ) : #NEWLINE# #INDENT# doc = dict ( doc . items ( ) ) #NEWLINE# content [ self [ '_id' ] ] = [ doc [ '_rev' ] ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise TypeError ( ( 'expected dict, got %s' % type ( doc ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# ( _ , _ , data ) = self . resource . post_json ( '_purge' , body = content ) #NEWLINE# return data