Hestia Utils
stable

API Reference

  • hestia_earth.utils
    • hestia_earth.utils.api
      • hestia_earth.utils.api.download_hestia
      • hestia_earth.utils.api.find_node
      • hestia_earth.utils.api.find_node_exact
      • hestia_earth.utils.api.find_related
      • hestia_earth.utils.api.find_term_ids_by_names
      • hestia_earth.utils.api.node_exists
      • hestia_earth.utils.api.node_to_path
      • hestia_earth.utils.api.node_type_to_url
      • hestia_earth.utils.api.search
    • hestia_earth.utils.date
    • hestia_earth.utils.lookup
    • hestia_earth.utils.model
    • hestia_earth.utils.request
    • hestia_earth.utils.storage
    • hestia_earth.utils.tools
    • hestia_earth.utils.version
Hestia Utils
  • »
  • hestia_earth.utils »
  • hestia_earth.utils.api »
  • hestia_earth.utils.api.find_related
  • Edit on GitLab

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.

Next Previous

© Copyright 2020, Hestia Team Revision 30d62f72.

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