Entities
Entities
Entities(client: Connector = None, response: dict = None, type: str = None, spec: Query = None)
Bases: Subscriptable
This class is the common class to query any entity from ApertureDB. The specialized subclasses, which provide a more user friendly interface, are: * Blobs * Bounding Boxes * Images * Polygons * Videos
retrieve_entities classmethod
retrieve_entities(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
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client | Connector | Connector object to the database. | required |
spec | Query | description | required |
Raises:
| Type | Description |
|---|---|
e | description |
Returns:
| Type | Description |
|---|---|
List[Entities] | List[Entities]: One collection of connected entities for each entity in this collection. |
get_connected_entities
get_connected_entities(etype: Union[ObjectType, str], constraints: Constraints = None) -> List[Entities]
Gets all entities adjacent to and clustered around items of the collection
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
etype | ObjectType or str | Type or class of the connected entities to retrieve. | required |
constraints | Constraints | Filter applied to the connected entities. Defaults to None. | None |
Returns:
| Type | Description |
|---|---|
List[Entities] | List[Entities]: One collection of connected entities for each entity in this collection. |
get_blob
get_blob(entity) -> Any
Helper to get blobs for FindImage, FindVideo and FindBlob commands.