hestia_earth.utils.api.find_related¶
-
hestia_earth.utils.api.find_related(node_type, id, related_type, limit=100, offset=0, relationship=None)[source]¶ Return the list of related Nodes by going through a “relationship”. You can navigate the Hestia Graph Database using this method.
- Parameters
node_type (
SchemaType) – The @type of the Node to start from. Example: use SchemaType.Cycle to find nodes related to a Cycle.id (
str) – The @id of the Node to start from.related_type (
SchemaType) – The other Node to which the relation should go to. Example: use SchemaType.Source to find Source related to Cycle.limit – The limit of relationships to return. Asking for large number might result in timeouts.
offset – Use with limit to paginate through the results.
relationship – The relationship used to connect both Node. See the API for more information.