config
config ¶
DomoAccount_Config
dataclass
¶
DomoAccount_Config(
data_provider_type: str,
is_oauth: bool,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
)
Bases: DomoBase
DomoAccount Config abstract base class
from_dict
classmethod
¶
from_dict(
obj: dict[str, Any], parent: Any = None, **kwargs
)
Create instance from dict, handling camelCase, snake_case, and _field_map. Robust to missing or None _field_map. Uses _field_map for both directions.
Source code in src/crew_dcs/classes/DomoAccount/account_configs/_base.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 124 125 126 127 128 | |
to_dict ¶
to_dict(
export_fields: list[str] | None = None,
override_fn: Callable | None = None,
return_snake_case: bool = False,
**kwargs
) -> dict
Convert config to dictionary using provided fields or all _fields_for_serialization.
Source code in src/crew_dcs/classes/DomoAccount/account_configs/_base.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
validate_compare_serialization ¶
validate_compare_serialization(
raise_on_mismatch: bool = True,
) -> bool
Validate that to_dict() output matches raw data keys (ignoring values).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raise_on_mismatch
|
bool
|
If True, raises AccountConfig_SerializationMismatchError on mismatch. If False, returns False on mismatch. |
True
|
Returns:
| Type | Description |
|---|---|
bool
|
True if keys match, False otherwise (only if raise_on_mismatch=False) |
Raises:
| Type | Description |
|---|---|
AccountConfig_SerializationMismatchError
|
If keys don't match and raise_on_mismatch=True |
Source code in src/crew_dcs/classes/DomoAccount/account_configs/_base.py
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 | |
DomoAccount_Config_AbstractCredential
dataclass
¶
DomoAccount_Config_AbstractCredential(
data_provider_type: str = "abstract-credential-store",
is_oauth: bool = False,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
credentials: dict = None,
)
Bases: DomoAccount_Config
Abstract credential store — stores arbitrary key-value credentials.
The Domo API expects the credentials field as a JSON string,
not a dict. This class handles the serialization/deserialization
transparently so callers can work with a plain Python dict.
from_dict
classmethod
¶
from_dict(obj, parent=None, **kwargs)
Parse the API response, converting credentials string to dict.
Source code in src/crew_dcs/classes/DomoAccount/account_configs/domo.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
to_dict ¶
to_dict(**kwargs) -> dict
Serialize to API format — credentials as JSON string.
Source code in src/crew_dcs/classes/DomoAccount/account_configs/domo.py
58 59 60 61 62 63 | |
DomoAccount_Config_Bls
dataclass
¶
DomoAccount_Config_Bls(
data_provider_type: str = "bls",
is_oauth: bool = False,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
)
Bases: DomoAccount_Config
Bureau of Labor Statistics — public data API, no credentials required.
The live API response only contains allowExternalUse.
DomoAccount_Config_DomoToS3
dataclass
¶
DomoAccount_Config_DomoToS3(
data_provider_type: str = "domo-to-s3",
is_oauth: bool = False,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
client_id: str = None,
client_secret: str = None,
bucket: str = None,
region: str = "us-west-2",
_field_map: list[dict[str:str]] = (
lambda: {
"client_id": "access_key",
"client_secret": "secret_Key",
}
)(),
)
DomoAccount_Config_DomoToSalesforce2
dataclass
¶
DomoAccount_Config_DomoToSalesforce2(
data_provider_type: str = "domo-to-salesforce-2",
is_oauth: bool = True,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
)
Bases: DomoAccount_Config_OAuthBase
Domo → Salesforce write-back (v2) — OAuth, no credential fields exposed via config API.
DomoAccount_Config_GoogleSheets
dataclass
¶
DomoAccount_Config_GoogleSheets(
data_provider_type: str = "google-sheets",
is_oauth: bool = True,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
)
Bases: DomoAccount_Config_OAuthBase
Google Sheets — OAuth, no credential fields exposed via config API.
DomoAccount_Config_HighBandwidthConnector
dataclass
¶
DomoAccount_Config_HighBandwidthConnector(
data_provider_type: str = "amazon-athena-high-bandwidth",
is_oauth: bool = False,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
access_key: str = None,
secret_key: str = None,
bucket: str = None,
region: str = "us-west-2",
workgroup: str = None,
)
DomoAccount_Config_Json5
dataclass
¶
DomoAccount_Config_Json5(
data_provider_type: str = "json5",
is_oauth: bool = False,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
api_key: str = None,
name: str = None,
api_type: str = None,
authentication: str = None,
)
Bases: DomoAccount_Config
JSON5 REST/JSON connector authenticated with an API key.
Fields reverse-engineered from live API response
apiKey → api_key name — header name (e.g. "x-domo-developer-token") apiType → api_type (e.g. "header") authentication — auth scheme (e.g. "apiKey")
DomoAccount_Config_OAuthBase
dataclass
¶
DomoAccount_Config_OAuthBase(
data_provider_type: str = "",
is_oauth: bool = True,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
)
Bases: DomoAccount_Config
Base for OAuth connector accounts that return null from the config API.
from_dict is safe to call with obj=None (OAuth connectors have no
retrievable credential fields). to_dict returns {} so callers that
check config.to_dict() != {} skip the missing-key test.
DomoAccount_Config_Salesforce
dataclass
¶
DomoAccount_Config_Salesforce(
data_provider_type: str = "salesforce",
is_oauth: bool = True,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
)
Bases: DomoAccount_Config_OAuthBase
Salesforce CRM — OAuth, no credential fields exposed via config API.
DomoAccount_Config_Snowflake
dataclass
¶
DomoAccount_Config_Snowflake(
data_provider_type: str = "snowflake",
is_oauth: bool = False,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
account: str = None,
username: str = None,
password: str = None,
host: str = None,
role: str = None,
)
DomoAccount_Config_SnowflakeKeyPairAuthentication
dataclass
¶
DomoAccount_Config_SnowflakeKeyPairAuthentication(
data_provider_type: str = "snowflakekeypairauthentication",
is_oauth: bool = False,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
private_key: str = None,
account: str = None,
passphrase: str = None,
username: str = None,
role: str = None,
_fields_for_serialization: list[str] = (
lambda: [
"private_key",
"role",
"account",
"username",
"passphrase",
]
)(),
)
Bases: DomoAccount_Config
Snowflake Key Pair Authentication.
Required fields for this config (enforced at runtime): - private_key - account - username
These values are required by the Domo API for Snowflake key pair accounts and must be present on the config instance before serialization.
DomoAccount_Config_SnowflakeKeyPairInternalManagedUnload
dataclass
¶
DomoAccount_Config_SnowflakeKeyPairInternalManagedUnload(
data_provider_type: str = "snowflake-keypair-internal-managed-unload",
is_oauth: bool = False,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
private_key: str = None,
account: str = None,
passphrase: str = None,
username: str = None,
role: str = None,
_field_map: dict = (
lambda: {"passPhrase": "passphrase"}
)(),
)
DomoAccount_Config_SnowflakeKeyPairUnload_V2
dataclass
¶
DomoAccount_Config_SnowflakeKeyPairUnload_V2(
data_provider_type: str = "snowflake-key-pair-unload-v2",
is_oauth: bool = False,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
private_key: str = None,
account: str = None,
passphrase: str = None,
username: str = None,
role: str = None,
access_key: str = None,
secret_key: str = None,
bucket: str = None,
region: str = None,
encryption_type: str = None,
_field_map: dict = (
lambda: {"passPhrase": "passphrase"}
)(),
_fields_for_serialization: list[str] = (
lambda: [
"private_key",
"role",
"account",
"username",
"passphrase",
"access_key",
"secret_key",
"bucket",
"region",
"encryption_type",
]
)(),
)
DomoAccount_Config_SnowflakeKeyPairWriteback
dataclass
¶
DomoAccount_Config_SnowflakeKeyPairWriteback(
data_provider_type: str = "snowflake-key-pair-writeback",
is_oauth: bool = False,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
private_key: str = None,
account: str = None,
passphrase: str = None,
username: str = None,
role: str = None,
_field_map: dict = (
lambda: {"passPhrase": "passphrase"}
)(),
_fields_for_serialization: list[str] = (
lambda: [
"private_key",
"role",
"account",
"username",
"passphrase",
]
)(),
)
DomoAccount_Config_SnowflakeUnload_V2
dataclass
¶
DomoAccount_Config_SnowflakeUnload_V2(
data_provider_type: str = "snowflake-unload-v2",
is_oauth: bool = False,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
account: str = None,
username: str = None,
password: str = None,
access_key: str = None,
secret_key: str = None,
region: str = None,
bucket: str = None,
role: str = None,
_fields_for_serialization: list[str] = (
lambda: [
"account",
"username",
"password",
"access_key",
"secret_key",
"bucket",
"region",
"role",
]
)(),
)
DomoAccount_Config_Squareup
dataclass
¶
DomoAccount_Config_Squareup(
data_provider_type: str = "squareup",
is_oauth: bool = True,
allow_external_use: bool = True,
parent: Any = None,
raw: dict = None,
)
Bases: DomoAccount_Config_OAuthBase
Square (Squareup) payments — OAuth, no credential fields exposed via config API.
register_account_config ¶
register_account_config(data_provider_type: str)
Decorator to register a DomoAccount_Config subclass.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_provider_type
|
str
|
The data provider type identifier (e.g., 'snowflake') |
required |
Example
@register_account_config('snowflake') @dataclass class DomoAccount_Config_Snowflake(DomoAccount_Config): account: str = None username: str = None password: str = field(repr=False, default=None) role: str = None
Source code in src/crew_dcs/classes/DomoAccount/config.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |