card_default
card_default ¶
Default DomoCard implementation
DomoCardAccessController ¶
DomoCardAccessController(auth: DomoAuth, parent)
Bases: DomoAccessRelationshipController
Access controller for Domo cards.
Source code in src/crew_dcs/classes/DomoCard/access_controller.py
26 27 28 29 | |
add_owners
async
¶
add_owners(
domo_users: list[Any] | None = None,
domo_groups: list[Any] | None = None,
user_ids: list[str | int] | None = None,
group_ids: list[str | int] | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> bool
Add owners to the card.
Source code in src/crew_dcs/classes/DomoCard/access_controller.py
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
create_relationship
async
¶
create_relationship(
target_entity_id: str,
target_entity_type: EntityType,
relationship_type: RelationshipType,
**kwargs
) -> bool
Create an access relationship for the card.
Source code in src/crew_dcs/classes/DomoCard/access_controller.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
get_accesslist
async
¶
get_accesslist(
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[Relationship]
Get access list for the card as relationships.
Source code in src/crew_dcs/classes/DomoCard/access_controller.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
get_direct_relationships
async
¶
get_direct_relationships() -> list[Relationship]
Get direct relationships for the card.
Source code in src/crew_dcs/classes/DomoCard/access_controller.py
35 36 37 | |
get_owner_entities
async
¶
get_owner_entities(
is_suppress_errors: bool = True,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[Any]
Resolve owner entities (users/groups) for this card.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
is_suppress_errors
|
bool
|
When True, suppress DomoError resolution failures. |
True
|
context
|
RouteContext | None
|
Optional RouteContext for API call configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
list[Any]
|
list of DomoUser/DomoGroup entities |
Source code in src/crew_dcs/classes/DomoCard/access_controller.py
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 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | |
get_owners
async
¶
get_owners(
*, context: RouteContext | None = None, **context_kwargs
) -> list[Relationship]
Get owner relationships for the card.
Source code in src/crew_dcs/classes/DomoCard/access_controller.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | |
remove_owners
async
¶
remove_owners(
domo_users: list[Any] | None = None,
domo_groups: list[Any] | None = None,
user_ids: list[str | int] | None = None,
group_ids: list[str | int] | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> bool
Remove owners from the card.
Source code in src/crew_dcs/classes/DomoCard/access_controller.py
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | |
remove_relationship
async
¶
remove_relationship(
target_entity_id: str,
target_entity_type: EntityType,
relationship_type: RelationshipType,
**kwargs
) -> bool
Remove an access relationship for the card.
Source code in src/crew_dcs/classes/DomoCard/access_controller.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
share
async
¶
share(
domo_users: list[Any] | None = None,
domo_groups: list[Any] | None = None,
user_ids: list[str | int] | None = None,
group_ids: list[str | int] | None = None,
message: str | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> bool
Share the card with users or groups.
Source code in src/crew_dcs/classes/DomoCard/access_controller.py
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | |
DomoCard_BeastModesManager
dataclass
¶
DomoCard_BeastModesManager(
parent: DomoEntity,
beast_modes: list[DomoBeastMode] = list(),
)
Bases: DomoSubEntity
Manager for beast modes associated with a DomoCard.
Provides typed access to all beast modes linked to a card.
Usage
bms = await card.BeastModes.get() card.BeastModes.beast_modes # list[DomoBeastMode]
get
async
¶
get(
*, context: RouteContext | None = None, **context_kwargs
) -> list[DomoBeastMode]
Fetch beast modes linked to this card.
Delegates to DomoBeastModes.get_by_card and caches the result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
list[DomoBeastMode]
|
List of DomoBeastMode instances linked to this card |
Source code in src/crew_dcs/classes/DomoCard/manager_beastmodes.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
DomoCard_DatasetsManager
dataclass
¶
DomoCard_DatasetsManager(
auth: DomoAuth,
parent: DomoCard_Default = None,
datasets: list[Any] = list(),
)
Bases: DomoManager
Manager for datasets associated with a DomoCard.
Provides access to all datasets used by a card through its datasources. Inherits from DomoManager to follow standard entity manager patterns.
get
async
¶
get(
debug_api: bool = False,
session: AsyncClient | None = None,
*,
context: RouteContext | None = None,
parent_auth_retrieval_fn: (
Callable[[str], Any] | None
) = None,
**context_kwargs
) -> list[Any]
Get all datasets associated with this card.
This retrieves datasets from the card's datasources and returns DomoDataset instances for each one.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
debug_api
|
bool
|
Enable API debugging |
False
|
session
|
AsyncClient | None
|
Optional httpx session for request reuse |
None
|
Returns:
| Type | Description |
|---|---|
list[Any]
|
list[DomoDataset]: List of dataset objects associated with the card |
Source code in src/crew_dcs/classes/DomoCard/manager_dataset.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
DomoCard_Default
dataclass
¶
DomoCard_Default(
auth: DomoAuth,
id: str,
raw: dict,
Lineage: DomoLineage | None = None,
Definition: DomoCard_DefinitionManager | None = None,
Datasets: DomoCard_DatasetsManager | None = None,
Owners: DomoCard_OwnerManager | None = None,
Pages: DomoCard_PageManager | None = None,
Access: DomoCardAccessController | None = None,
BeastModes: DomoCard_BeastModesManager | None = None,
title: str | None = None,
description: str | None = None,
type: str | None = None,
urn: str | None = None,
chart_type: str | None = None,
badge_type: str | None = None,
dataset_id: str | None = None,
datastore_id: str | None = None,
domo_collections: list[Any] = list(),
domo_source_code: Any = None,
certification: dict | None = None,
_init_owners: InitVar[list[Any] | None] = None,
pages: list[Any] = list(),
)
Bases: DomoEntity_w_Lineage
Base DomoCard implementation with core functionality
datasets
property
¶
datasets: list[Any]
Legacy property access - prefer using Datasets.get() for async operations
entity_name
property
¶
entity_name: str
Get the display name for this card.
Cards use the 'title' field as their display name.
Returns:
| Type | Description |
|---|---|
str
|
Card title, or card ID as fallback |
name
property
¶
name: str
Get the display name for this card.
Implements abstract property from DomoEntity_w_Lineage. Cards use the 'title' field as their display name.
Returns:
| Type | Description |
|---|---|
str
|
Card title, or "Untitled Card {id}" as fallback |
add_owners
async
¶
add_owners(
owners: list[Any],
debug_api: bool = False,
session: AsyncClient | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[Any]
Add owners (users or groups) to this card.
Source code in src/crew_dcs/classes/DomoCard/card_default.py
636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 | |
from_dict
classmethod
¶
from_dict(
auth: DomoAuth,
obj: dict[str, Any],
owners: list[Any] | None = None,
pages: list[Any] | None = None,
)
Synchronous factory method for dict → Card construction.
Build a DomoCard_Default instance from a metadata dictionary and owners list.
This method does not invoke any other class methods or perform additional API calls. All required data must be provided in the arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
DomoAuth instance for authentication |
required |
obj
|
dict[str, Any]
|
Card metadata dictionary (from API) |
required |
owners
|
list[Any] | None
|
List of owner entities (DomoUser/DomoGroup), optional |
None
|
Returns:
| Type | Description |
|---|---|
|
DomoCard_Default instance |
Source code in src/crew_dcs/classes/DomoCard/card_default.py
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 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | |
get_by_id
async
classmethod
¶
get_by_id(
auth: DomoAuth,
card_id: str,
optional_parts: str = "metadata,certification,datasources,drillPath,owners,properties,domoapp",
check_if_published: bool | None = None,
resolve_pages: bool | None = None,
resolve_datasources: bool | None = None,
parent_auth_retrieval_fn: Callable | None = None,
parent_auth: DomoAuth | None = None,
max_subscriptions_to_check: int | None = None,
debug_api: bool = False,
session: AsyncClient | None = None,
return_raw: bool = False,
is_suppress_errors: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
)
Retrieve a DomoCard by ID, including publication/certification status.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
DomoAuth instance |
required |
card_id
|
str
|
Card ID to retrieve |
required |
optional_parts
|
str
|
Comma-separated metadata parts to include (owners, certification, etc.) |
'metadata,certification,datasources,drillPath,owners,properties,domoapp'
|
check_if_published
|
bool | None
|
When True, checks if card is published (federated + subscriptions). If None and either parent_auth or parent_auth_retrieval_fn is provided, defaults to True. |
None
|
resolve_pages
|
bool | None
|
When True, resolve page entities from metadata and link in lineage. If None, preserves current behavior (resolve pages if present). |
None
|
resolve_datasources
|
bool | None
|
When True, resolve dataset entities from datasources and link in lineage. If None, defaults to False (no dataset resolution). |
None
|
parent_auth_retrieval_fn
|
Callable | None
|
Callable returning publisher auth when given publisher domain |
None
|
parent_auth
|
DomoAuth | None
|
Pre-existing publisher auth (alternative to parent_auth_retrieval_fn) |
None
|
max_subscriptions_to_check
|
int | None
|
Optional limit when scanning subscriptions |
None
|
debug_api
|
bool
|
Enable API debug logging |
False
|
session
|
AsyncClient | None
|
Optional httpx session |
None
|
return_raw
|
bool
|
If True, return raw API response |
False
|
is_suppress_errors
|
bool
|
If True, suppress errors during owner resolution (handled via Access) |
False
|
context
|
RouteContext | None
|
Optional RouteContext for API call configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
|
DomoCard_Default instance (or raw response if return_raw) |
Processing steps
- Fetch card metadata from API (includes owners, certification, datasources, etc.)
- If return_raw, return API response directly
- If card is federated and check_if_published is True, run additional check for publication status
- Build DomoCard_Default instance
Source code in src/crew_dcs/classes/DomoCard/card_default.py
377 378 379 380 381 382 383 384 385 386 387 388 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 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 | |
get_owners
async
¶
get_owners(
debug_api: bool = False,
session: AsyncClient | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[Any]
Refresh owners for this card.
Source code in src/crew_dcs/classes/DomoCard/card_default.py
617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | |
get_pages
async
¶
get_pages(
debug_api: bool = False,
session: AsyncClient | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[Any]
Refresh pages this card appears on.
Source code in src/crew_dcs/classes/DomoCard/card_default.py
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 | |
hydrate_card_metadata
async
classmethod
¶
hydrate_card_metadata(
cards: list[DomoCard_Default],
auth: DomoAuth,
*,
context: RouteContext | None = None,
**context_kwargs
) -> None
Batch-hydrate card metadata (chartType/badge_type) from the API.
The lineage API does not include card metadata. This method fetches metadata for all cards in a single batch request and updates their badge_type and chart_type fields in-place.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cards
|
list[DomoCard_Default]
|
List of DomoCard instances to hydrate |
required |
auth
|
DomoAuth
|
Authentication object |
required |
context
|
RouteContext | None
|
Optional RouteContext |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Source code in src/crew_dcs/classes/DomoCard/card_default.py
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | |
remove_owners
async
¶
remove_owners(
owners: list[Any],
debug_api: bool = False,
session: AsyncClient | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[Any]
Remove owners (users or groups) from this card.
Source code in src/crew_dcs/classes/DomoCard/card_default.py
657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 | |
to_dict ¶
to_dict(
override_fn: Callable | None = None,
return_snake_case: bool = False,
) -> dict
Serialize card for export/debugging with safe owner serialization.
Source code in src/crew_dcs/classes/DomoCard/card_default.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
DomoCard_OwnerManager
dataclass
¶
DomoCard_OwnerManager(
auth: DomoAuth | None = None,
parent: DomoCard_Default | None = None,
owners: list[Any] = list(),
)
Bases: DomoRelationshipController
Manager for owners associated with a DomoCard.
add_owners
async
¶
add_owners(
owners: list[Any],
debug_api: bool = False,
session: AsyncClient | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[Any]
Add owners (users or groups) to this card.
Source code in src/crew_dcs/classes/DomoCard/manager_owner.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | |
create_relationship
async
¶
create_relationship(
target_entity_id: str,
target_entity_type: EntityType,
relationship_type: RelationshipType,
**kwargs
) -> bool
Create an owner relationship for this card.
Source code in src/crew_dcs/classes/DomoCard/manager_owner.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
get
async
¶
get(
debug_api: bool = False,
session: AsyncClient | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[Any]
Get owners for this card.
Source code in src/crew_dcs/classes/DomoCard/manager_owner.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |
get_direct_relationships
async
¶
get_direct_relationships() -> list[Relationship]
Get owner relationships for this card.
Source code in src/crew_dcs/classes/DomoCard/manager_owner.py
38 39 40 41 42 43 44 45 46 47 | |
remove_owners
async
¶
remove_owners(
owners: list[Any],
debug_api: bool = False,
session: AsyncClient | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[Any]
Remove owners (users or groups) from this card.
Source code in src/crew_dcs/classes/DomoCard/manager_owner.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | |
remove_relationship
async
¶
remove_relationship(
target_entity_id: str,
target_entity_type: EntityType,
relationship_type: RelationshipType,
**kwargs
) -> bool
Remove an owner relationship for this card.
Source code in src/crew_dcs/classes/DomoCard/manager_owner.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
DomoCard_PageManager
dataclass
¶
DomoCard_PageManager(
auth: DomoAuth | None = None,
parent: DomoCard_Default | None = None,
pages: list[Any] = list(),
)
Bases: DomoRelationshipController
Manager for pages associated with a DomoCard.
add_pages
async
¶
add_pages(
page_ids: list[str | int],
debug_api: bool = False,
session: AsyncClient | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[Any]
Add this card to the specified pages.
Source code in src/crew_dcs/classes/DomoCard/manager_page.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
create_relationship
async
¶
create_relationship(
target_entity_id: str,
target_entity_type: EntityType,
relationship_type: RelationshipType,
**kwargs
) -> bool
Create a card -> page relationship by adding the card to a page.
Source code in src/crew_dcs/classes/DomoCard/manager_page.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
get
async
¶
get(
debug_api: bool = False,
session: AsyncClient | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[Any]
Get pages that include this card.
Source code in src/crew_dcs/classes/DomoCard/manager_page.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | |
get_direct_relationships
async
¶
get_direct_relationships() -> list[Relationship]
Get relationships between this card and its pages.
Source code in src/crew_dcs/classes/DomoCard/manager_page.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 | |
remove_pages
async
¶
remove_pages(
page_ids: list[str | int],
debug_api: bool = False,
session: AsyncClient | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[Any]
Remove this card from the specified pages.
Source code in src/crew_dcs/classes/DomoCard/manager_page.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | |
remove_relationship
async
¶
remove_relationship(
target_entity_id: str,
target_entity_type: EntityType,
relationship_type: RelationshipType,
**kwargs
) -> bool
Remove a card -> page relationship by removing the card from a page.
Source code in src/crew_dcs/classes/DomoCard/manager_page.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |