exchangelib/folders/collections.py
def find_people(self, q, shape=ID_ONLY, depth=None, additional_fields=None, order_fields=None,
                    page_size=None, max_items=None, offset=0):
        """Private method to call the FindPeople service.

        :param q: a Q instance containing any restrictions
        :param shape: controls whether to return (id, chanegkey) tuples or Persona objects. If additional_fields is
          non-null, we always return Persona objects. (Default value = ID_ONLY)
        :param depth: controls the whether to return soft-deleted items or not. (Default value = None)
        :param additional_fields: the extra properties we want on the return objects. Default is no properties.
        :param order_fields: the SortOrder fields, if any (Default value = None)
        :param page_size: the requested number of items per page (Default value = None)
        :param max_items: the max number of items to return (Default value = None)
        :param offset: the offset relative to the first item in the item collection (Default value = 0)

        :return: a generator for the returned personas
        """
        folder = self._get_single_folder()
        if not folder:
            return
        if q.is_never():
            log.debug('Query will never return results')
            return
        if shape not in SHAPE_CHOICES:
            raise ValueError("'shape' %s must be one of %s" % (shape, SHAPE_CHOICES))
        if depth is None:
            depth = self._get_default_item_traversal_depth()
        if depth not in ITEM_TRAVERSAL_CHOICES:
            raise ValueError("'depth' %s must be one of %s" % (depth, ITEM_TRAVERSAL_CHOICES))
        if additional_fields:
            for f in additional_fields:
                Persona.validate_field(field=f, version=self.account.version)
                if f.field.is_complex:
                    raise ValueError("find_people() does not support field '%s'" % f.field.name)

        # Build up any restrictions
        if q.is_empty():
            restriction = None
            query_string = None
        elif q.query_string:
            restriction = None
            query_string = Restriction(q, folders=[folder], applies_to=Restriction.ITEMS)
        else:
            restriction = Restriction(q, folders=[folder], applies_to=Restriction.ITEMS)
            query_string = None
        yield from FindPeople(account=self.account, chunk_size=page_size).call(
                folder=[folder],
                additional_fields=additional_fields,
                restriction=restriction,
                order_fields=order_fields,
                shape=shape,
                query_string=query_string,
                depth=depth,
                max_items=max_items,
                offset=offset,
        )
Private method to call the FindPeople service.

        :param q: a Q instance containing any restrictions
        :param shape: controls whether to return (id, chanegkey) tuples or Persona objects. If additional_fields is
          non-null, we always return Persona objects. (Default value = ID_ONLY)
        :param depth: controls the whether to return soft-deleted items or not. (Default value = None)
        :param additional_fields: the extra properties we want on the return objects. Default is no properties.
        :param order_fields: the SortOrder fields, if any (Default value = None)
        :param page_size: the requested number of items per page (Default value = None)
        :param max_items: the max number of items to return (Default value = None)
        :param offset: the offset relative to the first item in the item collection (Default value = 0)

        :return: a generator for the returned personas
        
Private method to call the FindPeople service.
Private method to call the FindPeople service .
def find_people(self, q, shape=ID_ONLY, depth=None, additional_fields=None, order_fields=None,
                    page_size=None, max_items=None, offset=0):
        folder = self._get_single_folder()
        if not folder:
            return
        if q.is_never():
            log.debug('Query will never return results')
            return
        if shape not in SHAPE_CHOICES:
            raise ValueError("'shape' %s must be one of %s" % (shape, SHAPE_CHOICES))
        if depth is None:
            depth = self._get_default_item_traversal_depth()
        if depth not in ITEM_TRAVERSAL_CHOICES:
            raise ValueError("'depth' %s must be one of %s" % (depth, ITEM_TRAVERSAL_CHOICES))
        if additional_fields:
            for f in additional_fields:
                Persona.validate_field(field=f, version=self.account.version)
                if f.field.is_complex:
                    raise ValueError("find_people() does not support field '%s'" % f.field.name)
        if q.is_empty():
            restriction = None
            query_string = None
        elif q.query_string:
            restriction = None
            query_string = Restriction(q, folders=[folder], applies_to=Restriction.ITEMS)
        else:
            restriction = Restriction(q, folders=[folder], applies_to=Restriction.ITEMS)
            query_string = None
        yield from FindPeople(account=self.account, chunk_size=page_size).call(
                folder=[folder],
                additional_fields=additional_fields,
                restriction=restriction,
                order_fields=order_fields,
                shape=shape,
                query_string=query_string,
                depth=depth,
                max_items=max_items,
                offset=offset,
        )
def find_people ( self , q , shape = ID_ONLY , depth = None , additional_fields = None , order_fields = None , page_size = None , max_items = None , offset = 0 ) : folder = self . _get_single_folder ( ) if not folder : return if q . is_never ( ) : log . debug ( 'Query will never return results' ) return if shape not in SHAPE_CHOICES : raise ValueError ( "'shape' %s must be one of %s" % ( shape , SHAPE_CHOICES ) ) if depth is None : depth = self . _get_default_item_traversal_depth ( ) if depth not in ITEM_TRAVERSAL_CHOICES : raise ValueError ( "'depth' %s must be one of %s" % ( depth , ITEM_TRAVERSAL_CHOICES ) ) if additional_fields : for f in additional_fields : Persona . validate_field ( field = f , version = self . account . version ) if f . field . is_complex : raise ValueError ( "find_people() does not support field '%s'" % f . field . name ) if q . is_empty ( ) : restriction = None query_string = None elif q . query_string : restriction = None query_string = Restriction ( q , folders = [ folder ] , applies_to = Restriction . ITEMS ) else : restriction = Restriction ( q , folders = [ folder ] , applies_to = Restriction . ITEMS ) query_string = None yield from FindPeople ( account = self . account , chunk_size = page_size ) . call ( folder = [ folder ] , additional_fields = additional_fields , restriction = restriction , order_fields = order_fields , shape = shape , query_string = query_string , depth = depth , max_items = max_items , offset = offset , )
Private method to call the FindPeople service.
Private method to call the FindPeople service .
"""Private method to call the FindPeople service.

        :param q: a Q instance containing any restrictions
        :param shape: controls whether to return (id, chanegkey) tuples or Persona objects. If additional_fields is
          non-null, we always return Persona objects. (Default value = ID_ONLY)
        :param depth: controls the whether to return soft-deleted items or not. (Default value = None)
        :param additional_fields: the extra properties we want on the return objects. Default is no properties.
        :param order_fields: the SortOrder fields, if any (Default value = None)
        :param page_size: the requested number of items per page (Default value = None)
        :param max_items: the max number of items to return (Default value = None)
        :param offset: the offset relative to the first item in the item collection (Default value = 0)

        :return: a generator for the returned personas
        """ # Build up any restrictions
a generator for the returned personas
a generator for the returned personas
self
q
a Q instance containing any restrictions
a Q instance containing any restrictions
shape
controls whether to return (id, chanegkey) tuples or Persona objects. If additional_fields is
non-null, we always return Persona objects. (Default value = ID_ONLY)
controls whether to return ( id chanegkey ) tuples or Persona objects . If additional_fields is non - null we always return Persona objects . ( Default value = ID_ONLY )
depth
controls the whether to return soft-deleted items or not. (Default value = None)
controls the whether to return soft - deleted items or not . ( Default value = None )
additional_fields
the extra properties we want on the return objects. Default is no properties.
the extra properties we want on the return objects . Default is no properties .
order_fields
the SortOrder fields, if any (Default value = None)
the SortOrder fields if any ( Default value = None )
page_size
the requested number of items per page (Default value = None)
the requested number of items per page ( Default value = None )
max_items
the max number of items to return (Default value = None)
the max number of items to return ( Default value = None )
offset
the offset relative to the first item in the item collection (Default value = 0)
the offset relative to the first item in the item collection ( Default value = 0 )