core
core ¶
DomoAccount
dataclass
¶
DomoAccount(
auth: DomoAuth,
id: int,
raw: dict,
name: str = None,
display_name: str = None,
data_provider_type: str = None,
created_dt: datetime = None,
modified_dt: datetime = None,
owners: list[Any] = None,
is_admin_summary: bool = True,
dataset_count: int = None,
Config: DomoAccount_Config = None,
)
Bases: DomoAccount_Default
A Domo account (the stored credentials a connector or integration uses).
from_dict
classmethod
¶
from_dict(
auth: DomoAuth,
obj: dict[str, Any],
is_admin_summary: bool = True,
is_use_default_class: bool = False,
new_cls: Any = None,
**kwargs,
)
converts data_v1_accounts API response into an accounts class object
Source code in src/crew_dcs/classes/DomoAccount/core.py
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 | |
DomoAccounts
dataclass
¶
DomoAccounts(
auth: DomoAuth,
accounts: list[DomoAccount] = None,
oauths: list[DomoAccount_OAuth] = None,
)
Bases: DomoManager
Manager for listing and searching the accounts and OAuth accounts in an instance.
get_accounts_accountsapi
async
¶
get_accounts_accountsapi(
debug_api: bool = False,
session: AsyncClient = None,
return_raw: bool = False,
is_use_default_account_class: bool = True,
debug_num_stacks_to_drop: int = 2,
*,
context: RouteContext | None = None,
**context_kwargs,
)
Calls route
Source code in src/crew_dcs/classes/DomoAccount/core.py
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 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
get_accounts_queryapi
async
¶
get_accounts_queryapi(
additional_filters_ls=None,
is_use_default_account_class: bool = False,
return_raw: bool = False,
debug_api: bool = False,
debug_num_stacks_to_drop: int = 2,
session: AsyncClient = None,
*,
context: RouteContext | None = None,
**context_kwargs,
)
v2 api for works with group_account_v2 beta
Calls route
Source code in src/crew_dcs/classes/DomoAccount/core.py
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 | |
get_oauths
async
¶
get_oauths(
debug_api: bool = False,
session: AsyncClient = None,
return_raw: bool = False,
debug_num_stacks_to_drop: int = 2,
*,
context: RouteContext | None = None,
**context_kwargs,
)
Calls route
Source code in src/crew_dcs/classes/DomoAccount/core.py
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 244 245 246 247 248 | |
search_by_name
async
¶
search_by_name(
account_name: str,
data_provider_type: str | None = None,
is_use_default_account_class: bool = True,
is_suppress_not_found_exception: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs,
) -> DomoAccount | None
Search for an account by name (matches display_name or name).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_name
|
str
|
Account name to search for (case-insensitive) |
required |
data_provider_type
|
str | None
|
Optional filter by data provider type |
None
|
is_use_default_account_class
|
bool
|
Use default account class |
True
|
is_suppress_not_found_exception
|
bool
|
Return None instead of raising when no account matches |
False
|
context
|
RouteContext | None
|
Optional RouteContext for API call configuration |
None
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
DomoAccount | None
|
The first matching DomoAccount; None only when no account matches and |
DomoAccount | None
|
is_suppress_not_found_exception is True. |
Raises:
| Type | Description |
|---|---|
DomoAccounts_NoAccount
|
No account matches and is_suppress_not_found_exception is False. |
Source code in src/crew_dcs/classes/DomoAccount/core.py
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 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 | |
upsert_account
async
classmethod
¶
upsert_account(
auth: DomoAuth,
account_id: str | None = None,
account_name: str | None = None,
account_config: AccountConfig = None,
data_provider_type: str | None = None,
debug_api: bool = False,
return_raw: bool = False,
return_search: bool = False,
is_use_default_account_class: bool = True,
session: AsyncClient = None,
*,
context: RouteContext | None = None,
**context_kwargs,
)
search for an account and upsert it
Source code in src/crew_dcs/classes/DomoAccount/core.py
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 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 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 391 392 393 394 395 396 397 398 399 400 401 402 403 | |