Skip to content

path

relationalai.semantics.std.path
path(*args: Ref | Concept | Chain | PathPattern | Relationship) -> PathPattern

Create a PathPattern from a sequence of nodes and edges.

Standalone convenience form of Model.path, the preferred entry point to the path library; this form attempts to automatically identify the relevant model. See Model.path for details and examples, and PathPattern for the argument grammar.

Parameters

  • *args

    (Ref | Concept | Chain | PathPattern | Relationship, default: ()) - One or more arguments defining the path pattern to be matched. Each argument may be a node (Concept or Ref), an edge (Chain or Relationship), or a nested sub-path (PathPattern). See PathPattern for how they join.

Returns

  • PathPattern - A reusable path pattern specification.

Raises

  • relationalai.util.error.RAIException - If either no Model has been defined or multiple models have been defined in this Python process.
  • ValueError - If called with no arguments.