(self, events, tags, verbose=False)
return meta
Tags one or more events with a list of tags.

        Args:
            events: Array of JSON objects representing events.
            tags: List of tags (str) to add to the events.
            verbose: Bool that determines whether extra information
                is added to the meta dict that gets returned.

        Raises:
            ValueError: if tags is not a list of strings.
            RuntimeError: if the sketch is archived.

        Returns:
            A dict with the results from the tagging operation.
Tags one or more events with a list of tags.
Tags one or more events with a list of tags .
def tag_events(self, events, tags, verbose=False):
        """Tags one or more events with a list of tags.

        Args:
            events: Array of JSON objects representing events.
            tags: List of tags (str) to add to the events.
            verbose: Bool that determines whether extra information
                is added to the meta dict that gets returned.

        Raises:
            ValueError: if tags is not a list of strings.
            RuntimeError: if the sketch is archived.

        Returns:
            A dict with the results from the tagging operation.
        """
        if self.is_archived():
            raise RuntimeError(
                'Unable to tag events in an archived sketch.')

        if not isinstance(tags, list):
            raise ValueError('Tags need to be a list.')

        if not all(isinstance(x, str) for x in tags):
            raise ValueError('Tags need to be a list of strings.')

        form_data = {
            'tag_string': json.dumps(tags),
            'events': events,
            'verbose': verbose,
        }
        resource_url = '{0:s}/sketches/{1:d}/event/tagging/'.format(
            self.api.api_root, self.id)
        response = self.api.session.post(resource_url, json=form_data)
        status = error.check_return_status(response, logger)
        if not status:
            return {
                'number_of_events': len(events),
                'number_of_events_with_tag': 0,
                'success': status
            }

        response_json = error.get_response_json(response, logger)
        meta = response_json.get('meta', {})
        meta['total_number_of_events_sent_by_client'] = len(events)
        return meta
def tag_events ( self , events , tags , verbose = False ) : if self . is_archived ( ) : raise RuntimeError ( 'Unable to tag events in an archived sketch.' ) if not isinstance ( tags , list ) : raise ValueError ( 'Tags need to be a list.' ) if not all ( isinstance ( x , str ) for x in tags ) : raise ValueError ( 'Tags need to be a list of strings.' ) form_data = { 'tag_string' : json . dumps ( tags ) , 'events' : events , 'verbose' : verbose , } resource_url = '{0:s}/sketches/{1:d}/event/tagging/' . format ( self . api . api_root , self . id ) response = self . api . session . post ( resource_url , json = form_data ) status = error . check_return_status ( response , logger ) if not status : return { 'number_of_events' : len ( events ) , 'number_of_events_with_tag' : 0 , 'success' : status } response_json = error . get_response_json ( response , logger ) meta = response_json . get ( 'meta' , { } ) meta [ 'total_number_of_events_sent_by_client' ] = len ( events ) return meta