preheat_open.query.query_stuff

preheat_open.query.query_stuff(obj, query, sub_obj_attrs, sub_obj_attrs_for_removal=None, query_type=<class 'preheat_open.query.Query'>, include_obj=False, **kwargs)

Queries objects and their sub-objects based on specified criteria.

Parameters:
  • obj (object) – The object to query.

  • query (Query | list[Query | dict]) – The query or list of queries to apply.

  • sub_obj_attrs (list[str]) – The attributes of the object that contain sub-objects to query.

  • sub_obj_attrs_for_removal (list[str], optional) – The attributes to remove from sub-objects during querying.

  • query_type (type, optional) – The type of query to use.

  • include_obj (bool, optional) – Whether to include the object itself in the results if it matches the query.

  • kwargs – Additional keyword arguments for the query.

Returns:

A generator yielding objects that match the query.

Return type:

Generator[object, None, None]