core
core ¶
Core DomoPage entity class and basic operations.
DomoPage
dataclass
¶
DomoPage(
auth: DomoAuth,
id: int,
raw: dict,
Lineage: DomoLineage | None = None,
title: str | None = None,
top_page_id: int | None = None,
parent_page_id: int | None = None,
is_locked: bool | None = None,
collections: list[dict] = list(),
custom_attributes: dict[str, Any] = dict(),
parent_page: dict[str, Any] | None = None,
top_page: dict[str, Any] | None = None,
children: list[Any] = list(),
Access: DomoPageAccessController | None = None,
Layout: DomoPageLayout | None = None,
)
Bases: DomoPage_Default
DomoPage entity with federation support via FederationContext.
create
async
classmethod
¶
create(
auth: DomoAuth,
title: str,
parent_page_id: int = 0,
*,
return_raw: bool = False,
context: RouteContext | None = None,
**context_kwargs
)
Create a new page (dashboard) and return the hydrated DomoPage.
For a full dashboard (page + cards + layout) use
dashboard_builder.create_dashboard; this creates the page shell.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
DomoAuth instance. |
required |
title
|
str
|
Page title. |
required |
parent_page_id
|
int
|
Parent page id (0 for a top-level page). |
0
|
return_raw
|
bool
|
Return the raw create response instead of a DomoPage. |
False
|
context
|
RouteContext | None
|
Optional RouteContext. |
None
|
Source code in src/crew_dcs/classes/DomoPage/core.py
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 | |
delete
async
¶
delete(
*, context: RouteContext | None = None, **context_kwargs
)
Delete this page.
Source code in src/crew_dcs/classes/DomoPage/core.py
690 691 692 693 694 695 696 697 698 699 700 | |
get_by_id
async
classmethod
¶
get_by_id(
page_id: str,
auth: DomoAuth,
suppress_no_results_error: bool = True,
return_raw: bool = False,
debug_api: bool = False,
include_layout: bool = False,
debug_num_stacks_to_drop=2,
session: AsyncClient = None,
id=None,
check_if_published: bool | None = None,
parent_auth_retrieval_fn: Callable | None = None,
parent_auth: DomoAuth | None = None,
max_subscriptions_to_check: int | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
)
Retrieve page data as a DomoPage instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
page_id
|
str
|
Page identifier |
required |
auth
|
DomoAuth
|
Authentication object |
required |
suppress_no_results_error
|
bool
|
Suppress errors when no results found |
True
|
return_raw
|
bool
|
Return raw API response |
False
|
debug_api
|
bool
|
Enable debug logging |
False
|
include_layout
|
bool
|
Include page layout in response |
False
|
debug_num_stacks_to_drop
|
Stack frames to drop in debug output |
2
|
|
session
|
AsyncClient
|
Optional HTTP session |
None
|
id
|
Alternative parameter for page_id |
None
|
|
check_if_published
|
bool | None
|
When True, checks if page is published (requires subscription check). If None and either parent_auth or parent_auth_retrieval_fn is provided, defaults to True. |
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
|
context
|
RouteContext | None
|
Optional RouteContext for API call configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
|
DomoPage instance |
Source code in src/crew_dcs/classes/DomoPage/core.py
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 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | |
DomoPage_Default
dataclass
¶
DomoPage_Default(
auth: DomoAuth,
id: int,
raw: dict,
Lineage: DomoLineage | None = None,
title: str | None = None,
top_page_id: int | None = None,
parent_page_id: int | None = None,
is_locked: bool | None = None,
collections: list[dict] = list(),
custom_attributes: dict[str, Any] = dict(),
parent_page: dict[str, Any] | None = None,
top_page: dict[str, Any] | None = None,
children: list[Any] = list(),
Access: DomoPageAccessController | None = None,
Layout: DomoPageLayout | None = None,
)
Bases: DomoEntity_w_Lineage
entity_name
property
¶
entity_name: str
Get the display name for this page.
Pages use the 'title' field as their display name.
Returns:
| Type | Description |
|---|---|
str
|
Page title, or page ID as fallback |
name
property
¶
name: str
Get the display name for this page.
Implements abstract property from DomoEntity_w_Lineage. Pages use the 'title' field as their display name.
Returns:
| Type | Description |
|---|---|
str
|
Page title, or "Untitled Page {id}" as fallback |
to_dict ¶
to_dict(
override_fn: Callable | None = None,
return_snake_case: bool = False,
) -> dict
Serialize page for export/debugging with layout card details.
Source code in src/crew_dcs/classes/DomoPage/core.py
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 | |