Skip to content

graflo.architecture.graph_types.pending

Edges whose endpoints are known only by a secondary identity.

A producer that builds a :class:~graflo.architecture.graph_types.container.GraphContainer itself (an extractor reading text, say) may know an edge's endpoint only by an alternate key: a phone number rather than the email that identifies a person. Such an edge cannot sit in the container, whose edges carry primary identities; it waits as a :class:PendingEdge until the endpoint is looked up in the target database at write time.

Attributes

Classes

EdgeEndpoint

Bases: ConfigBaseModel

How an edge reaches one vertex: by its primary identity, or by values of a secondary identity to look it up by.

Source code in graflo/architecture/graph_types/pending.py
class EdgeEndpoint(ConfigBaseModel):
    """How an edge reaches one vertex: by its primary identity, or by values of
    a secondary identity to look it up by."""

    vertex: str = Field(description="Vertex type.")
    identity: dict[str, Any] | None = Field(
        default=None, description="Primary identity, when known."
    )
    match: dict[str, Any] | None = Field(
        default=None, description="Secondary identity values to look the vertex up by."
    )

Attributes

identity = Field(default=None, description='Primary identity, when known.') class-attribute instance-attribute
match = Field(default=None, description='Secondary identity values to look the vertex up by.') class-attribute instance-attribute
vertex = Field(description='Vertex type.') class-attribute instance-attribute

PendingEdge

Bases: ConfigBaseModel

An edge with at least one endpoint known only by a secondary identity.

Source code in graflo/architecture/graph_types/pending.py
class PendingEdge(ConfigBaseModel):
    """An edge with at least one endpoint known only by a secondary identity."""

    edge_id: EdgeId
    source: EdgeEndpoint
    target: EdgeEndpoint
    props: dict[str, Any] = Field(default_factory=dict)

Attributes

edge_id instance-attribute
props = Field(default_factory=dict) class-attribute instance-attribute
source instance-attribute
target instance-attribute