Relationships
Relationships ¶
Unified Relationship System for Domo Objects
This module provides a comprehensive relationship framework that models all types of connections between Domo entities including access control, group membership, lineage tracking, and certification.
Key Concepts: 1. Relationships: Directional connections between entities (A → B) 2. Relationship Types: The nature of the connection (access, membership, lineage, etc.) 3. Entity Types: What kinds of objects can have relationships (users, groups, datasets, etc.) 4. Relationship Controllers: Manage specific types of relationships for objects
Examples of Relationships: - User HAS_ACCESS_EDITOR → Card - User IS_MEMBER_OF → Group - Dataset IS_DERIVED_FROM → Dataset - Card IS_CERTIFIED_BY → User - Dataset IS_TAGGED_WITH → Tag
DomoAccessRelationshipController ¶
DomoAccessRelationshipController(
auth: DomoAuth, parent_object: DomoEntity
)
Bases: DomoRelationshipController
Relationship controller for access/sharing relationships.
Source code in src/crew_dcs/classes/subentity/Relationships.py
195 196 197 198 199 200 201 202 | |
create_relationship
async
¶
create_relationship(
target_entity_id: str,
target_entity_type: EntityType,
relationship_type: RelationshipType,
**kwargs
) -> bool
Create an access relationship.
Source code in src/crew_dcs/classes/subentity/Relationships.py
365 366 367 368 369 370 371 372 | |
get_direct_relationships
async
¶
get_direct_relationships() -> list[Relationship]
Get direct access relationships for the object.
Source code in src/crew_dcs/classes/subentity/Relationships.py
360 361 | |
remove_relationship
async
¶
remove_relationship(
target_entity_id: str,
target_entity_type: EntityType,
relationship_type: RelationshipType,
**kwargs
) -> bool
Remove an access relationship.
Source code in src/crew_dcs/classes/subentity/Relationships.py
375 376 377 378 379 380 381 382 | |
DomoMembershipRelationshipController ¶
DomoMembershipRelationshipController(
auth: DomoAuth, parent_object: DomoEntity
)
Bases: DomoRelationshipController
Relationship controller for group membership relationships.
Source code in src/crew_dcs/classes/subentity/Relationships.py
195 196 197 198 199 200 201 202 | |
create_relationship
async
¶
create_relationship(
target_entity_id: str,
target_entity_type: EntityType,
relationship_type: RelationshipType,
**kwargs
) -> bool
Add entity to group with specified relationship.
Source code in src/crew_dcs/classes/subentity/Relationships.py
443 444 445 446 447 448 449 450 | |
get_direct_relationships
async
¶
get_direct_relationships(
*, context: RouteContext | None = None, **context_kwargs
) -> list[Relationship]
Get direct membership relationships for the group.
Source code in src/crew_dcs/classes/subentity/Relationships.py
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 | |
remove_relationship
async
¶
remove_relationship(
target_entity_id: str,
target_entity_type: EntityType,
relationship_type: RelationshipType,
**kwargs
) -> bool
Remove entity from group.
Source code in src/crew_dcs/classes/subentity/Relationships.py
453 454 455 456 457 458 459 460 | |
DomoRelationshipController ¶
DomoRelationshipController(
auth: DomoAuth, parent_object: DomoEntity
)
Bases: ABC
Abstract base class for managing relationships for specific object types.
Source code in src/crew_dcs/classes/subentity/Relationships.py
195 196 197 198 199 200 201 202 | |
create_relationship
abstractmethod
async
¶
create_relationship(
target_entity_id: str,
target_entity_type: EntityType,
relationship_type: RelationshipType,
**kwargs
) -> bool
Create a new relationship.
Source code in src/crew_dcs/classes/subentity/Relationships.py
208 209 210 211 212 213 214 215 216 | |
get_all_relationship_summaries
async
¶
get_all_relationship_summaries() -> (
dict[str, RelationshipSummary]
)
Get relationship summaries for all entities with relationships to this object.
Source code in src/crew_dcs/classes/subentity/Relationships.py
276 277 278 279 280 281 | |
get_direct_relationships
abstractmethod
async
¶
get_direct_relationships() -> list[Relationship]
Get all direct relationships for the parent object.
Source code in src/crew_dcs/classes/subentity/Relationships.py
204 205 206 | |
get_relationship_summary
async
¶
get_relationship_summary(
entity_id: str,
) -> RelationshipSummary
Get comprehensive relationship summary for a specific entity.
Source code in src/crew_dcs/classes/subentity/Relationships.py
263 264 265 266 267 268 269 270 271 272 273 274 | |
get_resolved_relationships
async
¶
get_resolved_relationships() -> list[Relationship]
Get resolved relationships (including those derived from group memberships).
Source code in src/crew_dcs/classes/subentity/Relationships.py
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
invalidate_cache ¶
invalidate_cache()
Invalidate the relationship cache to force refresh on next access.
Source code in src/crew_dcs/classes/subentity/Relationships.py
316 317 318 | |
remove_relationship
abstractmethod
async
¶
remove_relationship(
target_entity_id: str,
target_entity_type: EntityType,
relationship_type: RelationshipType,
**kwargs
) -> bool
Remove a relationship.
Source code in src/crew_dcs/classes/subentity/Relationships.py
218 219 220 221 222 223 224 225 226 | |
DomoRelationshipManager ¶
DomoRelationshipManager(auth: DomoAuth)
Main relationship manager that provides unified relationship management across all Domo objects.
Source code in src/crew_dcs/classes/subentity/Relationships.py
324 325 326 | |
get_controller ¶
get_controller(
domo_object: DomoEntity,
) -> DomoRelationshipController | None
Get the appropriate relationship controller for a Domo object.
Source code in src/crew_dcs/classes/subentity/Relationships.py
332 333 334 335 336 337 338 339 340 341 | |
get_entity_relationships
async
¶
get_entity_relationships(
entity_id: str,
entity_type: EntityType,
relationship_types: (
list[RelationshipType] | None
) = None,
) -> list[Relationship]
Get all relationships for an entity across all objects.
Source code in src/crew_dcs/classes/subentity/Relationships.py
343 344 345 346 347 348 349 | |
register_controller ¶
register_controller(
object_type: str, controller_class: type
)
Register a relationship controller for a specific object type.
Source code in src/crew_dcs/classes/subentity/Relationships.py
328 329 330 | |
EntityType ¶
Relationship
dataclass
¶
Relationship(
from_entity_id: str,
from_entity_type: EntityType,
to_entity_id: str,
to_entity_type: EntityType,
relationship_type: RelationshipType,
created_date: str | None = None,
created_by: str | None = None,
effective_date: str | None = None,
expiry_date: str | None = None,
source_relationship_id: str | None = None,
metadata: dict[str, Any] = dict(),
)
Bases: DomoBase
Represents a directional relationship between two entities.
is_access_relationship
property
¶
is_access_relationship: bool
Check if this is an access-related relationship.
is_lineage_relationship
property
¶
is_lineage_relationship: bool
Check if this is a lineage-related relationship.
is_membership_relationship
property
¶
is_membership_relationship: bool
Check if this is a membership-related relationship.
RelationshipSummary
dataclass
¶
RelationshipSummary(
entity_id: str,
entity_type: EntityType,
relationships: list[Relationship] = list(),
)
Bases: DomoBase
Summary of relationships for a specific entity.
effective_access_level
property
¶
effective_access_level: RelationshipType
Get the highest access level from all access relationships.
get_access_relationships ¶
get_access_relationships() -> list[Relationship]
Get all access-related relationships.
Source code in src/crew_dcs/classes/subentity/Relationships.py
157 158 159 | |
get_lineage_relationships ¶
get_lineage_relationships() -> list[Relationship]
Get all lineage-related relationships.
Source code in src/crew_dcs/classes/subentity/Relationships.py
165 166 167 | |
get_membership_relationships ¶
get_membership_relationships() -> list[Relationship]
Get all membership-related relationships.
Source code in src/crew_dcs/classes/subentity/Relationships.py
161 162 163 | |
get_relationships_by_type ¶
get_relationships_by_type(
relationship_type: RelationshipType,
) -> list[Relationship]
Get all relationships of a specific type.
Source code in src/crew_dcs/classes/subentity/Relationships.py
149 150 151 152 153 154 155 | |