-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path__init__.py
More file actions
189 lines (183 loc) · 5.62 KB
/
__init__.py
File metadata and controls
189 lines (183 loc) · 5.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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
80
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
111
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
151
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
182
183
184
185
186
187
188
189
"""This module provides the low-level client interface for interacting with the API of the Aignostics Platform.
The primary class in this module is the `Client` class, serving as the entry point
for authenticated API operations. Login and token management are handled
automatically.
Further operations are encapsulated in the `Service` class, which provides methods
for manual login, logout and getting information about the authenticated user.
Higher level abstractions are provided in the application module.
"""
from aignx.codegen.exceptions import ApiException, NotFoundException
from aignx.codegen.models import ApplicationReadResponse as Application
from aignx.codegen.models import ApplicationReadShortResponse as ApplicationSummary
from aignx.codegen.models import InputArtifact as InputArtifactData
from aignx.codegen.models import InputArtifactCreationRequest as InputArtifact
from aignx.codegen.models import ItemCreationRequest as InputItem
from aignx.codegen.models import (
ItemOutput,
ItemState,
ItemTerminationReason,
RunItemStatistics,
RunOutput,
RunState,
RunTerminationReason,
)
from aignx.codegen.models import ItemResultReadResponse as ItemResult
from aignx.codegen.models import MeReadResponse as Me
from aignx.codegen.models import OrganizationReadResponse as Organization
from aignx.codegen.models import OutputArtifact as OutputArtifactData
from aignx.codegen.models import OutputArtifactResultReadResponse as OutputArtifactElement
from aignx.codegen.models import RunReadResponse as RunData
from aignx.codegen.models import UserReadResponse as User
from aignx.codegen.models import VersionReadResponse as ApplicationVersion
from ._cli import cli_sdk, cli_user
from ._client import Client
from ._constants import (
API_ROOT_DEV,
API_ROOT_TEST,
API_ROOT_STAGING,
API_ROOT_PRODUCTION,
AUDIENCE_DEV,
AUDIENCE_TEST,
AUDIENCE_STAGING,
AUDIENCE_PRODUCTION,
AUTHORIZATION_BASE_URL_DEV,
AUTHORIZATION_BASE_URL_TEST,
AUTHORIZATION_BASE_URL_STAGING,
AUTHORIZATION_BASE_URL_PRODUCTION,
CLIENT_ID_INTERACTIVE_DEV,
CLIENT_ID_INTERACTIVE_TEST,
CLIENT_ID_INTERACTIVE_STAGING,
CLIENT_ID_INTERACTIVE_PRODUCTION,
DEFAULT_CPU_PROVISIONING_MODE,
DEFAULT_FLEX_START_MAX_RUN_DURATION_MINUTES,
DEFAULT_GPU_PROVISIONING_MODE,
DEFAULT_GPU_TYPE,
DEFAULT_MAX_GPUS_PER_SLIDE,
DEFAULT_NODE_ACQUISITION_TIMEOUT_MINUTES,
DEVICE_URL_DEV,
DEVICE_URL_TEST,
DEVICE_URL_STAGING,
DEVICE_URL_PRODUCTION,
JWS_JSON_URL_DEV,
JWS_JSON_URL_TEST,
JWS_JSON_URL_STAGING,
JWS_JSON_URL_PRODUCTION,
REDIRECT_URI_DEV,
REDIRECT_URI_TEST,
REDIRECT_URI_STAGING,
REDIRECT_URI_PRODUCTION,
STATUS_PAGE_URL_DEV,
STATUS_PAGE_URL_TEST,
STATUS_PAGE_URL_STAGING,
STATUS_PAGE_URL_PRODUCTION,
TOKEN_URL_DEV,
TOKEN_URL_TEST,
TOKEN_URL_STAGING,
TOKEN_URL_PRODUCTION,
)
from ._messages import AUTHENTICATION_FAILED, NOT_YET_IMPLEMENTED, UNKNOWN_ENDPOINT_URL
from ._sdk_metadata import (
PipelineConfig,
RunSdkMetadata,
SchedulingMetadata,
)
from ._service import Service, TokenInfo, UserInfo
from ._settings import Settings, settings
from ._utils import (
calculate_file_crc32c,
download_file,
generate_signed_url,
get_mime_type_for_artifact,
mime_type_to_file_ending,
)
from .resources.runs import LIST_APPLICATION_RUNS_MAX_PAGE_SIZE, LIST_APPLICATION_RUNS_MIN_PAGE_SIZE, Run
__all__ = [
"API_ROOT_DEV",
"API_ROOT_TEST",
"API_ROOT_STAGING",
"API_ROOT_PRODUCTION",
"AUDIENCE_DEV",
"AUDIENCE_TEST",
"AUDIENCE_STAGING",
"AUDIENCE_PRODUCTION",
"AUTHENTICATION_FAILED",
"AUTHORIZATION_BASE_URL_DEV",
"AUTHORIZATION_BASE_URL_TEST",
"AUTHORIZATION_BASE_URL_STAGING",
"AUTHORIZATION_BASE_URL_PRODUCTION",
"CLIENT_ID_INTERACTIVE_DEV",
"CLIENT_ID_INTERACTIVE_TEST",
"CLIENT_ID_INTERACTIVE_STAGING",
"CLIENT_ID_INTERACTIVE_PRODUCTION",
"DEFAULT_CPU_PROVISIONING_MODE",
"DEFAULT_CPU_PROVISIONING_MODE",
"DEFAULT_FLEX_START_MAX_RUN_DURATION_MINUTES",
"DEFAULT_GPU_PROVISIONING_MODE",
"DEFAULT_GPU_PROVISIONING_MODE",
"DEFAULT_GPU_TYPE",
"DEFAULT_GPU_TYPE",
"DEFAULT_MAX_GPUS_PER_SLIDE",
"DEFAULT_MAX_GPUS_PER_SLIDE",
"DEFAULT_NODE_ACQUISITION_TIMEOUT_MINUTES",
"DEVICE_URL_DEV",
"DEVICE_URL_TEST",
"DEVICE_URL_STAGING",
"DEVICE_URL_PRODUCTION",
"JWS_JSON_URL_DEV",
"JWS_JSON_URL_TEST",
"JWS_JSON_URL_STAGING",
"JWS_JSON_URL_PRODUCTION",
"LIST_APPLICATION_RUNS_MAX_PAGE_SIZE",
"LIST_APPLICATION_RUNS_MIN_PAGE_SIZE",
"NOT_YET_IMPLEMENTED",
"NOT_YET_IMPLEMENTED",
"REDIRECT_URI_DEV",
"REDIRECT_URI_TEST",
"REDIRECT_URI_STAGING",
"REDIRECT_URI_PRODUCTION",
"TOKEN_URL_DEV",
"TOKEN_URL_TEST",
"TOKEN_URL_STAGING",
"TOKEN_URL_PRODUCTION",
"UNKNOWN_ENDPOINT_URL",
"ApiException",
"Application",
"ApplicationSummary",
"ApplicationVersion",
"Client",
"InputArtifact",
"InputArtifactData",
"InputItem",
"ItemOutput",
"ItemResult",
"ItemState",
"ItemTerminationReason",
"Me",
"NotFoundException",
"Organization",
"OutputArtifactData",
"OutputArtifactElement",
"PipelineConfig",
"Run",
"RunData",
"RunItemStatistics",
"RunOutput",
"RunSdkMetadata",
"RunState",
"RunState",
"RunTerminationReason",
"SchedulingMetadata",
"Service",
"Settings",
"TokenInfo",
"User",
"UserInfo",
"calculate_file_crc32c",
"cli_sdk",
"cli_user",
"download_file",
"generate_signed_url",
"get_mime_type_for_artifact",
"mime_type_to_file_ending",
"settings",
]