Core¶
Core module.
Models¶
Core database models.
-
class
asclepias_broker.core.models.
Identifier
(**kwargs)[source]¶ Identifier model.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
property
data
¶ Get the metadata of the identity group the identifier belongs to.
-
get_children
(rel_type, as_relation=False)[source]¶ Get all children of given Identifier for given relation.
-
get_parents
(rel_type, as_relation=False)[source]¶ Get all parents of given Identifier for given relation.
-
property
identity_group
¶ Get the identity group the identifier belongs to.
-
property
-
class
asclepias_broker.core.models.
Relationship
(**kwargs)[source]¶ Relationship between two identifiers.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
property
data
¶ Get the relationship’s identity group metadata.
-
classmethod
get
(source, target, relation, **kwargs)[source]¶ Get the relationship from the database.
-
property
identity_group
¶ Get the relationship’s identity group.
-
property