Skip to content

bootstrap

bootstrap

DomoBootstrap dataclass

DomoBootstrap(
    auth: DomoAuth,
    customer_id: str = None,
    page_ls: list[DomoPage] = None,
    feature_ls: list[DomoBootstrap_Feature] = None,
    raw: dict = None,
)

Bases: DomoManager

get async

get(
    return_raw: bool = False,
    debug_api: bool = False,
    debug_num_stacks_to_drop=2,
    session: AsyncClient = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
)

Get the bootstrap information for the domo_instance.

Calls route

Source code in src/crew_dcs/classes/DomoInstanceConfig/bootstrap.py
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
async def get(
    self,
    return_raw: bool = False,
    debug_api: bool = False,
    debug_num_stacks_to_drop=2,
    session: httpx.AsyncClient = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Get the bootstrap information for the domo_instance."""

    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=debug_num_stacks_to_drop,
        **context_kwargs,
    )

    res = await bootstrap_routes.get_bootstrap(
        auth=self.auth,
        context=context,
    )

    self.raw = res.response

    if return_raw:
        return res

    return self.raw

get_customer_id async

get_customer_id(
    return_raw: bool = False,
    debug_api: bool = False,
    debug_num_stacks_to_drop=3,
    session: AsyncClient = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
)

Calls route

Source code in src/crew_dcs/classes/DomoInstanceConfig/bootstrap.py
 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
async def get_customer_id(
    self,
    return_raw: bool = False,
    debug_api: bool = False,
    debug_num_stacks_to_drop=3,
    session: httpx.AsyncClient = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=debug_num_stacks_to_drop,
        **context_kwargs,
    )

    res = await bootstrap_routes.get_bootstrap_customerid(
        auth=self.auth,
        context=context,
        return_raw=return_raw,
    )

    if return_raw:
        return res

    self.customer_id = res.response

    return self.customer_id

get_features async

get_features(
    debug_api: bool = False,
    return_raw: bool = False,
    debug_num_stacks_to_drop=2,
    session: AsyncClient = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
)

Calls route

Source code in src/crew_dcs/classes/DomoInstanceConfig/bootstrap.py
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
async def get_features(
    self,
    debug_api: bool = False,
    return_raw: bool = False,
    debug_num_stacks_to_drop=2,
    session: httpx.AsyncClient = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=debug_num_stacks_to_drop,
        **context_kwargs,
    )

    res = await bootstrap_routes.get_bootstrap_features(
        auth=self.auth,
        context=context,
        return_raw=return_raw,
    )

    if return_raw:
        return res

    feature_list = [DomoBootstrap_Feature.from_dict(obj) for obj in res.response]

    return feature_list  # noqa: RET504

get_pages async

get_pages(
    return_raw: bool = False,
    debug_api: bool = False,
    debug_num_stacks_to_drop=2,
    session: AsyncClient = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> list[DomoPage]

Calls route

Source code in src/crew_dcs/classes/DomoInstanceConfig/bootstrap.py
112
113
114
115
116
117
118
119
120
121
122
123
124
125
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
async def get_pages(
    self,
    return_raw: bool = False,
    debug_api: bool = False,
    debug_num_stacks_to_drop=2,
    session: httpx.AsyncClient = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> list[dmpg.DomoPage]:
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=debug_num_stacks_to_drop,
        **context_kwargs,
    )

    res = await bootstrap_routes.get_bootstrap_pages(
        auth=self.auth,
        context=context,
        return_raw=return_raw,
    )

    if return_raw:
        return res

    if not res.is_success:
        return None

    self.page_ls = await dmce.gather_with_concurrency(
        n=60,
        *[  # noqa: B026
            dmpg.DomoPage._from_bootstrap(page_obj, auth=self.auth)
            for page_obj in res.response
        ],
    )

    return self.page_ls

is_feature_accountsv2_enabled async

is_feature_accountsv2_enabled(
    debug_api: bool = False,
    return_raw: bool = False,
    debug_num_stacks_to_drop=3,
    session: AsyncClient = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
)

Calls route

Source code in src/crew_dcs/classes/DomoInstanceConfig/bootstrap.py
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
async def is_feature_accountsv2_enabled(
    self,
    debug_api: bool = False,
    return_raw: bool = False,
    debug_num_stacks_to_drop=3,
    session: httpx.AsyncClient = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=debug_num_stacks_to_drop,
        **context_kwargs,
    )

    res = await bootstrap_routes.get_bootstrap_features_is_accountsv2_enabled(
        auth=self.auth,
        context=context,
        return_raw=return_raw,
    )

    if return_raw:
        return res

    return res.response