import os
BeastMode Routes
= dmda.DomoTokenAuth(
auth =os.environ["DOMO_INSTANCE"],
domo_instance=os.environ["DOMO_ACCESS_TOKEN"],
domo_access_token )
search_beastmodes
search_beastmodes (auth:domolibrary.client.DomoAuth.DomoAuth, filters:List[dict]=None, session:httpx.AsyncClient=None, debug_api:bool=False, debug_num_stacks_to_drop=1, debug_loop:bool=False, parent_class=None, return_raw:bool=False)
generate_beastmode_body
generate_beastmode_body (name:str=None, filters:List[dict]=None, is_unlocked:bool=None, is_not_variable:bool=None, link:__main__.Search_BeastModeLink=None)
Search_BeastModeLink
Search_BeastModeLink (value, names=None, module=None, qualname=None, type=None, start=1)
An enumeration.
BeastModes_API_Error
BeastModes_API_Error (res:domolibrary.client.ResponseGetData.ResponseGet Data, message:str=None)
base exception
= (await search_beastmodes(auth=auth)).response
bms 0:1] bms[
[{'id': 3767,
'name': ' Beast Mode Card validation HV',
'owner': 453523183,
'lastModified': 1719502634109,
'created': 1700652674390,
'global': False,
'locked': True,
'legacyId': 'calculation_60cf2f9e-271d-4840-bb4b-f6f909ea542b',
'status': 'VALID',
'dataType': 'LONG',
'links': [{'resource': {'type': 'DATA_SOURCE',
'id': 'd40a70b1-d9a2-4145-b361-18ccf1fb3978'},
'visible': True,
'active': False,
'valid': 'VALID'},
{'resource': {'type': 'CARD', 'id': '1458307982'},
'visible': False,
'active': True,
'valid': 'VALID'}],
'archived': False,
'activeLinks': {'CARD': ['1458307982']}}]
lock_beastmode
lock_beastmode (beastmode_id, is_locked:bool, auth:domolibrary.client.DomoAuth.DomoAuth, session:httpx.AsyncClient=None, debug_api:bool=False, debug_num_stacks_to_drop=1, parent_class:str=None)
await lock_beastmode(beastmode_id=bms[0]["id"], auth=auth, is_locked=True)
ResponseGetData(status=200, response={'id': 3767, 'name': ' Beast Mode Card validation HV', 'owner': 453523183, 'locked': True, 'global': False, 'expression': 'SUM(CASE WHEN `date` IS NULL THEN 1 END) ', 'checkSum': '48dfb344c2619b8eff454828917b334fb5d4b813', 'links': [{'resource': {'type': 'CARD', 'id': '1458307982'}, 'visible': False, 'active': True, 'valid': 'VALID'}, {'resource': {'type': 'DATA_SOURCE', 'id': 'd40a70b1-d9a2-4145-b361-18ccf1fb3978'}, 'visible': True, 'active': False, 'valid': 'VALID'}], 'legacyId': 'calculation_60cf2f9e-271d-4840-bb4b-f6f909ea542b', 'lastModified': 1732724347613, 'created': 1700652674390, 'aggregated': True, 'analytic': False, 'dataType': 'LONG', 'status': 'VALID', 'cacheWindow': 'non_dynamic', 'columnPositions': [{'columnName': '`date`', 'columnPosition': 14}], 'functions': ['SUM'], 'archived': False, 'hidden': False, 'variable': False}, is_success=True, parent_class=None)
get_beastmode_by_id
get_beastmode_by_id (beastmode_id, auth:domolibrary.client.DomoAuth.DomoAuth, session:httpx.AsyncClient=None, debug_api:bool=False, debug_num_stacks_to_drop=1, parent_class:str=None)
await get_beastmode_by_id(beastmode_id=88, auth=auth)
ResponseGetData(status=200, response={'id': 88, 'name': 'Assignee Name', 'owner': 27, 'locked': False, 'global': False, 'expression': "IFNULL(`assignee_name`,'Unassigned')", 'checkSum': '645062939e9c0bf075eed53dee66ded387e63e22', 'links': [{'resource': {'type': 'DATA_SOURCE', 'id': 'fefc9896-1ae1-4bbb-9c3b-b8b0d949afab'}, 'visible': True, 'active': False, 'valid': 'VALID'}], 'legacyId': 'calculation_788cf3c8-649c-4f28-97ff-5dbc04a0b83a', 'lastModified': 1611124801814, 'created': 1580425705895, 'aggregated': False, 'analytic': False, 'nonAggregatedColumns': [], 'dataType': 'STRING', 'status': 'VALID', 'cacheWindow': 'non_dynamic', 'columnPositions': [{'columnName': '`assignee_name`', 'columnPosition': 7}], 'functions': ['IFNULL'], 'functionTemplateDependencies': [], 'archived': False, 'hidden': True, 'variable': False}, is_success=True, parent_class=None)
get_card_beastmodes
get_card_beastmodes (card_id, auth:domolibrary.client.DomoAuth.DomoAuth, debug_api:bool=False, session:httpx.AsyncClient=None, debug_num_stacks_to_drop=2, return_raw:bool=False)
= 2056437956
card_id = await get_card_beastmodes(card_id=card_id, auth=auth, return_raw=True)
res = res.response all_bms
get_dataset_beastmodes
get_dataset_beastmodes (dataset_id, auth:domolibrary.client.DomoAuth.DomoAuth, debug_api:bool=False, session:httpx.AsyncClient=None, debug_num_stacks_to_drop=2, return_raw:bool=False)
await get_dataset_beastmodes(
="d40a70b1-d9a2-4145-b361-18ccf1fb3978", auth=auth
dataset_id )
[{'id': 3767,
'name': ' Beast Mode Card validation HV',
'locked': True,
'legacyId': 'calculation_60cf2f9e-271d-4840-bb4b-f6f909ea542b',
'status': 'VALID',
'links': [{'resource': {'type': 'DATA_SOURCE',
'id': 'd40a70b1-d9a2-4145-b361-18ccf1fb3978'},
'visible': True,
'active': False,
'valid': 'VALID'},
{'resource': {'type': 'CARD', 'id': '1458307982'},
'visible': False,
'active': True,
'valid': 'VALID'}]}]
get_page_beastmodes
get_page_beastmodes (page_id, auth:domolibrary.client.DomoAuth.DomoAuth)
= 1845973736
page_id await get_page_beastmodes(page_id = page_id, auth = auth)) (
[]
async def page_toggle_beastmode_lock(page_id, is_locked, auth):
= await get_page_beastmodes(page_id = page_id, auth = auth)
bms
await dmce.gather_with_concurrency(*[ lock_beastmode(beastmode_id = bm['id'], auth = auth, is_locked = True) for bm in bms], n = 10)
return f"{'locked' if is_locked else 'unlocked'} beast modes on {page_id}"
await page_toggle_beastmode_lock(page_id = page_id, is_locked = False, auth = auth)
'unlocked beast modes on 1845973736'