Shortcuts

geodesic.entanglement.object.get_traits

geodesic.entanglement.object.get_traits(traits=None, refresh=False)[source]

Gets all registered traits and their predicates. A trait modifies an object class to allow certain kinds of connections between objects. For example, an “Observer” trait allows the “can-observe” predicate between two edges. If traits are specified, returns the predicates for each of these traits, if registered.

Parameters
  • traits – a list of trait names to check

  • refresh – by default, these names are cached. If you want to grab the latest from the server, set refresh to True

Returns

a list of dictionaries with the keys ‘name’ and ‘predicates’. ‘predicates’ contains

a list of Predicate objects for that trait.

Return type

traits

Example

>>> get_traits()
[{'name': 'Correlator', 'predicates': [{'name': 'correlates-with']},
{'name': 'Linker', 'predicates': [{'name': 'links']},
{'name': 'Observer', 'predicates': ['name': 'can-observe']}]

Docs

Developer documentation for Seer AI APIs

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources