linkahead.utils.get_entity module
Convenience functions to retrieve a specific entity.
- linkahead.utils.get_entity.get_entity_by_id(eid: str | int, role: str | None = None) Entity
Return the result of a unique query that uses the id to find the correct entity.
Submits the query “FIND {role} WITH id=’{eid}’”.
- Parameters:
role (str, optional) – The role for the query, defaults to
ENTITY
.
- linkahead.utils.get_entity.get_entity_by_name(name: str, role: str | None = None) Entity
Return the result of a unique query that uses the name to find the correct entity.
Submits the query “FIND {role} WITH name=’{name}’”.
- Parameters:
role (str, optional) – The role for the query, defaults to
ENTITY
.