geodesic.entanglement.object.add_predicates(trait, predicates)[source]

Add predicate definitions to Entanglement.

Predicates must be registered under a trait name and can be be specified with a few additional parameters.

A Predicate definition looks like this

    "name": "my-predicate",
    "unidirectional": False,  # default is False
    "one_to_one": False      # default is False

name should match the regex ^[a-z]+[a-z-]*$, meaning it should begin with a letter and only contain lowercase letters and hyphens. This is primarily for uniformity when reading graphs. The name should be short, but descriptive. It can convey multiple meanings, but that meaning should be able to be clarified by specifying edge attributes.

unidirectional is a boolean that makes an edge only traversible in one direction unless explicitly requested. Not recommended for the majority of applications. Edges are directional by default.

one_to_one restricts an edge to only connect a node to exactly one other instead of to multiple nodes.


Developer documentation for Seer AI APIs

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources