jupyter
jupyter ¶
Jupyter authentication classes for Domo.
DomoJupyterAuth ¶
Mixin for Jupyter auth. Not instantiable alone.
Provides jupyter_token, service_location, service_prefix validation and jupyter_auth_header. Use DomoJupyterFullAuth or DomoJupyterTokenAuth.
jupyter_auth_header
property
¶
jupyter_auth_header: dict
Header for Jupyter server API (Authorization: Token ...).
DomoJupyterFullAuth
dataclass
¶
DomoJupyterFullAuth(
jupyter_token: str,
service_location: str,
service_prefix: str,
domo_instance: str,
domo_username: str,
domo_password: str,
token_name: str | None = None,
token: str | None = None,
user_id: str | None = None,
is_valid_token: bool = False,
cache_responses: bool = False,
cache_size: int = 1000,
cache_default_ttl: int = 300,
cache_strategy: str | None = None,
custom_cache_rules: dict[str, list[str]] | None = None,
)
Bases: DomoJupyterAuth, DomoAuth
Jupyter authentication using full credentials (username/password).
auth_header
property
¶
auth_header: dict
Combined Domo + Jupyter headers (no guard — Jupyter token always present).
convert_auth
classmethod
¶
convert_auth(
auth: DomoFullAuth,
jupyter_token: str,
service_location: str,
service_prefix: str,
) -> DomoJupyterFullAuth
Create DomoJupyterFullAuth from DomoFullAuth + Jupyter params.
Source code in src/crew_dcs/auth/jupyter.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |
get_auth_token
async
¶
get_auth_token(
return_raw: bool = False, **context_kwargs
) -> str | ResponseGetData
Retrieve the authentication token from product APIs.
Source code in src/crew_dcs/auth/jupyter.py
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 | |
DomoJupyterTokenAuth
dataclass
¶
DomoJupyterTokenAuth(
jupyter_token: str,
service_location: str,
service_prefix: str,
domo_instance: str,
domo_access_token: str,
token_name: str | None = None,
token: str | None = None,
user_id: str | None = None,
is_valid_token: bool = False,
cache_responses: bool = False,
cache_size: int = 1000,
cache_default_ttl: int = 300,
cache_strategy: str | None = None,
custom_cache_rules: dict[str, list[str]] | None = None,
)
Bases: DomoJupyterAuth, DomoAuth
Jupyter authentication using access tokens.
auth_header
property
¶
auth_header: dict
Combined Domo + Jupyter headers (no guard — both tokens always present).
convert_auth
classmethod
¶
convert_auth(
auth: DomoTokenAuth,
jupyter_token: str,
service_location: str,
service_prefix: str,
) -> DomoJupyterTokenAuth
Create DomoJupyterTokenAuth from DomoTokenAuth + Jupyter params.
Source code in src/crew_dcs/auth/jupyter.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | |
get_auth_token
async
¶
get_auth_token(
token_name: str | None = None, **context_kwargs
) -> str
Retrieve the access token, validating via who_am_i if needed.
Source code in src/crew_dcs/auth/jupyter.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |