Skip to main content

Entities

Entities Objects

class Entities(Subscriptable)

This class is the common class to query any entity from ApertureDB. The specialized subclasses, which provide a more user friendly interface, are:

retrieve_entities

@classmethod
def retrieve_entities(
cls,
client: Connector,
spec: Query,
with_adjacent: Dict[str, Query] = None) -> List[Entities]

Using the Entities.retrieve method, is a simple layer, with typical native queries converted using :class:~aperturedb.Query.Query

Arguments:

  • client Connector - Connector object to the database.
  • spec Query - description

Raises:

  • e - description

Returns:

  • List[Entities] - description

get_connected_entities

def get_connected_entities(etype: Union[ObjectType, str],
constraints: Constraints = None) -> List[Entities]

Gets all entities adjacent to and clustered around items of the collection

Arguments:

  • pk str - description
  • type ObjectType - description
  • constraints Constraints, optional - description. Defaults to None.

Returns:

  • List[Entities] - description

get_blob

def get_blob(entity) -> Any

Helper to get blobs for FindImage, FindVideo and FindBlob commands.