#NEWLINE# def get_points( self , measurement = None , tags = None ) : #NEWLINE# #INDENT# '\n        Returns a generator for all the points that match the given filters.\n\n        :param measurement: The measurement name\n        :type measurement: str\n\n        :param tags: Tags to look for\n        :type tags: dict\n\n        :return: Points generator\n        ' #NEWLINE# if ( not isinstance ( measurement , ( bytes , type ( b'' . decode ( ) ) , type ( None ) ) ) ) : #NEWLINE# #INDENT# raise TypeError ( 'measurement must be an str or None' ) #NEWLINE# #UNINDENT# for serie in self . _get_series ( ) : #NEWLINE# #INDENT# serie_name = serie . get ( 'measurement' , serie . get ( 'name' , 'results' ) ) #NEWLINE# if ( serie_name is None ) : #NEWLINE# #INDENT# if ( tags is None ) : #NEWLINE# #INDENT# for item in self . _get_points_for_serie ( serie ) : #NEWLINE# #INDENT# ( yield item ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( measurement in ( None , serie_name ) ) : #NEWLINE# #INDENT# serie_tags = serie . get ( 'tags' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( ( tags is None ) or self . _tag_matches ( serie_tags , tags ) ) : #NEWLINE# #INDENT# for item in self . _get_points_for_serie ( serie ) : #NEWLINE# #INDENT# ( yield serie )