DomoJupyter Integration

auth = dmda.DomoTokenAuth(
    domo_instance=os.environ["DOMO_DOJO_INSTANCE"],
    domo_access_token=os.environ["DOMO_DOJO_ACCESS_TOKEN"],
)

JUPYTER_TOKEN = " OT98Xy8sePH894pA7SgUhjEcjk1kHK"
WORKSPACE_ID = '1cfe9db4-5937-4889-beb3-a311fc42f246' #learn_jupyter

workspace_params = await get_workspace_auth_token_params(
    workspace_id=WORKSPACE_ID, auth=auth
)

dj_auth = dmda.DomoJupyterTokenAuth.convert_auth(
    auth=auth, jupyter_token=JUPYTER_TOKEN, **workspace_params
)

![Tutorial Video pt 4 of 4]

DomoJupyter Content and Class


source

DomoJupyter_Content

 DomoJupyter_Content (name:str, folder:str,
                      last_modified:datetime.datetime, file_type:str,
                      content:str,
                      auth:domolibrary.client.DomoAuth.DomoJupyterAuth,
                      default_export_folder:str='export')
try:
    await DomoJupyter_Content.create_content(
        auth=dj_auth,
        new_content="hello world",
        folder_path="./admin/song/help6.txt",
        debug_api=False,
    )

except dmde.DomoError as e:
    print(e)
🛑  JupyterAPI_Error 🛑 - function: DomoJupyter_Content.get_traceback || status 403 || unable to query API, valid jupyter_token? at domo-community