Hestia Utils
master

API Reference

  • hestia_earth.utils
    • hestia_earth.utils.api_url
    • hestia_earth.utils.download_hestia
    • hestia_earth.utils.find_node
    • hestia_earth.utils.find_node_exact
    • hestia_earth.utils.find_related
    • hestia_earth.utils.get_s3_client
    • hestia_earth.utils.join_args
    • hestia_earth.utils.load_from_bucket
    • hestia_earth.utils.non_empty_value
    • hestia_earth.utils.request_url
    • hestia_earth.utils.search_url
    • hestia_earth.utils.lookup
    • hestia_earth.utils.model
    • hestia_earth.utils.version
Hestia Utils
  • »
  • hestia_earth.utils »
  • hestia_earth.utils.find_related
  • Edit on GitLab

hestia_earth.utils.find_related¶

hestia_earth.utils.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.

Next Previous

© Copyright 2020, Hestia Team Revision dd3fd190.

Built with Sphinx using a theme provided by Read the Docs.