qi-compute-api-client 0.52.0__py3-none-any.whl → 0.54.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of qi-compute-api-client might be problematic. Click here for more details.
- compute_api_client/__init__.py +194 -95
- compute_api_client/api/algorithms_api.py +75 -81
- compute_api_client/api/auth_config_api.py +16 -24
- compute_api_client/api/backend_api.py +70 -86
- compute_api_client/api/backend_types_api.py +77 -56
- compute_api_client/api/batch_jobs_api.py +102 -120
- compute_api_client/api/commits_api.py +85 -80
- compute_api_client/api/files_api.py +62 -67
- compute_api_client/api/final_results_api.py +42 -53
- compute_api_client/api/health_api.py +16 -25
- compute_api_client/api/jobs_api.py +76 -83
- compute_api_client/api/languages_api.py +30 -42
- compute_api_client/api/members_api.py +62 -67
- compute_api_client/api/permissions_api.py +56 -70
- compute_api_client/api/projects_api.py +89 -97
- compute_api_client/api/reservations_api.py +57 -72
- compute_api_client/api/results_api.py +76 -83
- compute_api_client/api/teams_api.py +30 -42
- compute_api_client/api/transactions_api.py +31 -44
- compute_api_client/api/users_api.py +62 -67
- compute_api_client/api_client.py +135 -75
- compute_api_client/api_response.py +3 -3
- compute_api_client/configuration.py +176 -36
- compute_api_client/docs/Algorithm.md +8 -7
- compute_api_client/docs/AlgorithmIn.md +7 -6
- compute_api_client/docs/AlgorithmType.md +5 -3
- compute_api_client/docs/AlgorithmsApi.md +15 -10
- compute_api_client/docs/AuthConfig.md +3 -2
- compute_api_client/docs/AuthConfigApi.md +3 -2
- compute_api_client/docs/Backend.md +9 -8
- compute_api_client/docs/BackendApi.md +15 -10
- compute_api_client/docs/BackendIn.md +8 -7
- compute_api_client/docs/BackendPatch.md +5 -4
- compute_api_client/docs/BackendStatus.md +9 -3
- compute_api_client/docs/BackendType.md +21 -19
- compute_api_client/docs/BackendTypePatch.md +4 -2
- compute_api_client/docs/BackendTypesApi.md +21 -10
- compute_api_client/docs/BackendWithAuthentication.md +10 -9
- compute_api_client/docs/BatchJob.md +10 -9
- compute_api_client/docs/BatchJobIn.md +4 -3
- compute_api_client/docs/BatchJobStatus.md +11 -3
- compute_api_client/docs/BatchJobsApi.md +23 -16
- compute_api_client/docs/Commit.md +8 -7
- compute_api_client/docs/CommitIn.md +5 -4
- compute_api_client/docs/CommitsApi.md +15 -10
- compute_api_client/docs/CompilePayload.md +4 -3
- compute_api_client/docs/CompileStage.md +11 -3
- compute_api_client/docs/Domain.md +7 -3
- compute_api_client/docs/File.md +10 -9
- compute_api_client/docs/FileIn.md +9 -8
- compute_api_client/docs/FilesApi.md +12 -8
- compute_api_client/docs/FinalResult.md +7 -6
- compute_api_client/docs/FinalResultIn.md +5 -4
- compute_api_client/docs/FinalResultsApi.md +9 -6
- compute_api_client/docs/HTTPBadRequestError.md +3 -2
- compute_api_client/docs/HTTPNotFoundError.md +3 -2
- compute_api_client/docs/HTTPValidationError.md +3 -2
- compute_api_client/docs/HealthApi.md +3 -2
- compute_api_client/docs/Job.md +13 -12
- compute_api_client/docs/Job1.md +28 -0
- compute_api_client/docs/JobIn.md +6 -5
- compute_api_client/docs/JobPatch.md +8 -7
- compute_api_client/docs/JobStatus.md +11 -3
- compute_api_client/docs/JobsApi.md +15 -10
- compute_api_client/docs/Language.md +6 -5
- compute_api_client/docs/LanguagesApi.md +6 -4
- compute_api_client/docs/Member.md +8 -7
- compute_api_client/docs/MemberId.md +28 -0
- compute_api_client/docs/MemberIn.md +7 -6
- compute_api_client/docs/MembersApi.md +12 -8
- compute_api_client/docs/PageAlgorithm.md +3 -2
- compute_api_client/docs/PageBackend.md +3 -2
- compute_api_client/docs/PageBackendType.md +3 -2
- compute_api_client/docs/PageBatchJob.md +3 -2
- compute_api_client/docs/PageCommit.md +3 -2
- compute_api_client/docs/PageFile.md +3 -2
- compute_api_client/docs/PageJob.md +3 -2
- compute_api_client/docs/PageLanguage.md +3 -2
- compute_api_client/docs/PageMember.md +3 -2
- compute_api_client/docs/PagePermission.md +3 -2
- compute_api_client/docs/PagePermissionGroup.md +3 -2
- compute_api_client/docs/PageProject.md +3 -2
- compute_api_client/docs/PageReservation.md +3 -2
- compute_api_client/docs/PageResult.md +3 -2
- compute_api_client/docs/PageTeam.md +3 -2
- compute_api_client/docs/PageTransaction.md +3 -2
- compute_api_client/docs/PageUser.md +3 -2
- compute_api_client/docs/Permission.md +6 -5
- compute_api_client/docs/PermissionGroup.md +5 -4
- compute_api_client/docs/PermissionsApi.md +12 -8
- compute_api_client/docs/Project.md +9 -8
- compute_api_client/docs/ProjectIn.md +7 -6
- compute_api_client/docs/ProjectPatch.md +3 -2
- compute_api_client/docs/ProjectsApi.md +23 -13
- compute_api_client/docs/Reservation.md +9 -8
- compute_api_client/docs/ReservationIn.md +7 -6
- compute_api_client/docs/ReservationsApi.md +12 -8
- compute_api_client/docs/Result.md +7 -6
- compute_api_client/docs/ResultIn.md +5 -4
- compute_api_client/docs/ResultsApi.md +15 -10
- compute_api_client/docs/Role.md +5 -3
- compute_api_client/docs/ShareType.md +7 -3
- compute_api_client/docs/Team.md +7 -6
- compute_api_client/docs/TeamsApi.md +6 -4
- compute_api_client/docs/Transaction.md +6 -5
- compute_api_client/docs/TransactionDomain.md +28 -0
- compute_api_client/docs/TransactionsApi.md +6 -4
- compute_api_client/docs/User.md +11 -10
- compute_api_client/docs/UserIn.md +10 -9
- compute_api_client/docs/UsersApi.md +12 -8
- compute_api_client/docs/ValidationError.md +4 -3
- compute_api_client/docs/ValidationErrorLocInner.md +28 -0
- compute_api_client/exceptions.py +74 -24
- compute_api_client/models/__init__.py +1 -1
- compute_api_client/models/algorithm.py +19 -20
- compute_api_client/models/algorithm_in.py +18 -19
- compute_api_client/models/algorithm_type.py +1 -9
- compute_api_client/models/auth_config.py +14 -14
- compute_api_client/models/backend.py +20 -20
- compute_api_client/models/backend_in.py +19 -19
- compute_api_client/models/backend_patch.py +16 -15
- compute_api_client/models/backend_status.py +1 -9
- compute_api_client/models/backend_type.py +42 -36
- compute_api_client/models/backend_type_patch.py +23 -17
- compute_api_client/models/backend_with_authentication.py +21 -21
- compute_api_client/models/batch_job.py +21 -20
- compute_api_client/models/batch_job_in.py +15 -15
- compute_api_client/models/batch_job_status.py +1 -9
- compute_api_client/models/commit.py +19 -19
- compute_api_client/models/commit_in.py +16 -16
- compute_api_client/models/compile_payload.py +15 -15
- compute_api_client/models/compile_stage.py +1 -9
- compute_api_client/models/domain.py +1 -9
- compute_api_client/models/file.py +21 -22
- compute_api_client/models/file_in.py +20 -21
- compute_api_client/models/final_result.py +18 -17
- compute_api_client/models/final_result_in.py +16 -16
- compute_api_client/models/http_bad_request_error.py +14 -14
- compute_api_client/models/http_not_found_error.py +14 -14
- compute_api_client/models/http_validation_error.py +18 -18
- compute_api_client/models/job.py +24 -24
- compute_api_client/models/job1.py +144 -0
- compute_api_client/models/job_in.py +17 -17
- compute_api_client/models/job_patch.py +19 -20
- compute_api_client/models/job_status.py +1 -9
- compute_api_client/models/language.py +17 -18
- compute_api_client/models/member.py +19 -19
- compute_api_client/models/member_id.py +144 -0
- compute_api_client/models/member_in.py +18 -18
- compute_api_client/models/page_algorithm.py +18 -19
- compute_api_client/models/page_backend.py +18 -19
- compute_api_client/models/page_backend_type.py +18 -19
- compute_api_client/models/page_batch_job.py +18 -19
- compute_api_client/models/page_commit.py +18 -19
- compute_api_client/models/page_file.py +18 -19
- compute_api_client/models/page_job.py +18 -19
- compute_api_client/models/page_language.py +18 -19
- compute_api_client/models/page_member.py +18 -19
- compute_api_client/models/page_permission.py +18 -19
- compute_api_client/models/page_permission_group.py +18 -19
- compute_api_client/models/page_project.py +18 -19
- compute_api_client/models/page_reservation.py +18 -19
- compute_api_client/models/page_result.py +18 -19
- compute_api_client/models/page_team.py +18 -19
- compute_api_client/models/page_transaction.py +18 -19
- compute_api_client/models/page_user.py +18 -19
- compute_api_client/models/permission.py +17 -18
- compute_api_client/models/permission_group.py +16 -17
- compute_api_client/models/project.py +20 -20
- compute_api_client/models/project_in.py +18 -19
- compute_api_client/models/project_patch.py +14 -15
- compute_api_client/models/reservation.py +20 -19
- compute_api_client/models/reservation_in.py +18 -17
- compute_api_client/models/result.py +18 -17
- compute_api_client/models/result_in.py +16 -16
- compute_api_client/models/role.py +1 -9
- compute_api_client/models/share_type.py +1 -9
- compute_api_client/models/team.py +18 -19
- compute_api_client/models/transaction.py +17 -17
- compute_api_client/models/transaction_domain.py +142 -0
- compute_api_client/models/user.py +22 -23
- compute_api_client/models/user_in.py +21 -22
- compute_api_client/models/validation_error.py +20 -20
- compute_api_client/models/validation_error_loc_inner.py +138 -0
- compute_api_client/rest.py +51 -26
- {qi_compute_api_client-0.52.0.dist-info → qi_compute_api_client-0.54.0.dist-info}/METADATA +12 -9
- qi_compute_api_client-0.54.0.dist-info/RECORD +205 -0
- qi_compute_api_client-0.52.0.dist-info/RECORD +0 -197
- {qi_compute_api_client-0.52.0.dist-info → qi_compute_api_client-0.54.0.dist-info}/WHEEL +0 -0
- {qi_compute_api_client-0.52.0.dist-info → qi_compute_api_client-0.54.0.dist-info}/licenses/LICENSE.md +0 -0
|
@@ -13,11 +13,15 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
import copy
|
|
16
|
+
import http.client as httplib
|
|
16
17
|
import logging
|
|
18
|
+
from logging import FileHandler
|
|
17
19
|
import sys
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union
|
|
21
|
+
from typing_extensions import NotRequired, Self
|
|
22
|
+
|
|
18
23
|
import urllib3
|
|
19
24
|
|
|
20
|
-
import http.client as httplib
|
|
21
25
|
|
|
22
26
|
JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
|
23
27
|
'multipleOf', 'maximum', 'exclusiveMaximum',
|
|
@@ -25,10 +29,115 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
|
|
25
29
|
'minLength', 'pattern', 'maxItems', 'minItems'
|
|
26
30
|
}
|
|
27
31
|
|
|
32
|
+
ServerVariablesT = Dict[str, str]
|
|
33
|
+
|
|
34
|
+
GenericAuthSetting = TypedDict(
|
|
35
|
+
"GenericAuthSetting",
|
|
36
|
+
{
|
|
37
|
+
"type": str,
|
|
38
|
+
"in": str,
|
|
39
|
+
"key": str,
|
|
40
|
+
"value": str,
|
|
41
|
+
},
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
OAuth2AuthSetting = TypedDict(
|
|
46
|
+
"OAuth2AuthSetting",
|
|
47
|
+
{
|
|
48
|
+
"type": Literal["oauth2"],
|
|
49
|
+
"in": Literal["header"],
|
|
50
|
+
"key": Literal["Authorization"],
|
|
51
|
+
"value": str,
|
|
52
|
+
},
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
APIKeyAuthSetting = TypedDict(
|
|
57
|
+
"APIKeyAuthSetting",
|
|
58
|
+
{
|
|
59
|
+
"type": Literal["api_key"],
|
|
60
|
+
"in": str,
|
|
61
|
+
"key": str,
|
|
62
|
+
"value": Optional[str],
|
|
63
|
+
},
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
BasicAuthSetting = TypedDict(
|
|
68
|
+
"BasicAuthSetting",
|
|
69
|
+
{
|
|
70
|
+
"type": Literal["basic"],
|
|
71
|
+
"in": Literal["header"],
|
|
72
|
+
"key": Literal["Authorization"],
|
|
73
|
+
"value": Optional[str],
|
|
74
|
+
},
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
BearerFormatAuthSetting = TypedDict(
|
|
79
|
+
"BearerFormatAuthSetting",
|
|
80
|
+
{
|
|
81
|
+
"type": Literal["bearer"],
|
|
82
|
+
"in": Literal["header"],
|
|
83
|
+
"format": Literal["JWT"],
|
|
84
|
+
"key": Literal["Authorization"],
|
|
85
|
+
"value": str,
|
|
86
|
+
},
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
BearerAuthSetting = TypedDict(
|
|
91
|
+
"BearerAuthSetting",
|
|
92
|
+
{
|
|
93
|
+
"type": Literal["bearer"],
|
|
94
|
+
"in": Literal["header"],
|
|
95
|
+
"key": Literal["Authorization"],
|
|
96
|
+
"value": str,
|
|
97
|
+
},
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
HTTPSignatureAuthSetting = TypedDict(
|
|
102
|
+
"HTTPSignatureAuthSetting",
|
|
103
|
+
{
|
|
104
|
+
"type": Literal["http-signature"],
|
|
105
|
+
"in": Literal["header"],
|
|
106
|
+
"key": Literal["Authorization"],
|
|
107
|
+
"value": None,
|
|
108
|
+
},
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
AuthSettings = TypedDict(
|
|
113
|
+
"AuthSettings",
|
|
114
|
+
{
|
|
115
|
+
"user_bearer": OAuth2AuthSetting,
|
|
116
|
+
"backend": APIKeyAuthSetting,
|
|
117
|
+
},
|
|
118
|
+
total=False,
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class HostSettingVariable(TypedDict):
|
|
123
|
+
description: str
|
|
124
|
+
default_value: str
|
|
125
|
+
enum_values: List[str]
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class HostSetting(TypedDict):
|
|
129
|
+
url: str
|
|
130
|
+
description: str
|
|
131
|
+
variables: NotRequired[Dict[str, HostSettingVariable]]
|
|
132
|
+
|
|
133
|
+
|
|
28
134
|
class Configuration:
|
|
29
135
|
"""This class contains various settings of the API client.
|
|
30
136
|
|
|
31
137
|
:param host: Base url.
|
|
138
|
+
:param ignore_operation_servers
|
|
139
|
+
Boolean to ignore operation servers for the API client.
|
|
140
|
+
Config will use `host` as the base url regardless of the operation servers.
|
|
32
141
|
:param api_key: Dict to store API key(s).
|
|
33
142
|
Each entry in the dict specifies an API key.
|
|
34
143
|
The dict key is the name of the security scheme in the OAS specification.
|
|
@@ -51,6 +160,9 @@ class Configuration:
|
|
|
51
160
|
values before.
|
|
52
161
|
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
|
|
53
162
|
in PEM format.
|
|
163
|
+
:param retries: Number of retries for API requests.
|
|
164
|
+
:param ca_cert_data: verify the peer using concatenated CA certificate data
|
|
165
|
+
in PEM (str) or DER (bytes) format.
|
|
54
166
|
|
|
55
167
|
:Example:
|
|
56
168
|
|
|
@@ -74,16 +186,27 @@ conf = compute_api_client.Configuration(
|
|
|
74
186
|
Cookie: JSESSIONID abc123
|
|
75
187
|
"""
|
|
76
188
|
|
|
77
|
-
_default = None
|
|
78
|
-
|
|
79
|
-
def __init__(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
189
|
+
_default: ClassVar[Optional[Self]] = None
|
|
190
|
+
|
|
191
|
+
def __init__(
|
|
192
|
+
self,
|
|
193
|
+
host: Optional[str]=None,
|
|
194
|
+
api_key: Optional[Dict[str, str]]=None,
|
|
195
|
+
api_key_prefix: Optional[Dict[str, str]]=None,
|
|
196
|
+
username: Optional[str]=None,
|
|
197
|
+
password: Optional[str]=None,
|
|
198
|
+
access_token: Optional[str]=None,
|
|
199
|
+
server_index: Optional[int]=None,
|
|
200
|
+
server_variables: Optional[ServerVariablesT]=None,
|
|
201
|
+
server_operation_index: Optional[Dict[int, int]]=None,
|
|
202
|
+
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
|
|
203
|
+
ignore_operation_servers: bool=False,
|
|
204
|
+
ssl_ca_cert: Optional[str]=None,
|
|
205
|
+
retries: Optional[int] = None,
|
|
206
|
+
ca_cert_data: Optional[Union[str, bytes]] = None,
|
|
207
|
+
*,
|
|
208
|
+
debug: Optional[bool] = None,
|
|
209
|
+
) -> None:
|
|
87
210
|
"""Constructor
|
|
88
211
|
"""
|
|
89
212
|
self._base_path = "http://localhost" if host is None else host
|
|
@@ -97,6 +220,9 @@ conf = compute_api_client.Configuration(
|
|
|
97
220
|
self.server_operation_variables = server_operation_variables or {}
|
|
98
221
|
"""Default server variables
|
|
99
222
|
"""
|
|
223
|
+
self.ignore_operation_servers = ignore_operation_servers
|
|
224
|
+
"""Ignore operation servers
|
|
225
|
+
"""
|
|
100
226
|
self.temp_folder_path = None
|
|
101
227
|
"""Temp file folder for downloading files
|
|
102
228
|
"""
|
|
@@ -134,13 +260,16 @@ conf = compute_api_client.Configuration(
|
|
|
134
260
|
self.logger_stream_handler = None
|
|
135
261
|
"""Log stream handler
|
|
136
262
|
"""
|
|
137
|
-
self.logger_file_handler = None
|
|
263
|
+
self.logger_file_handler: Optional[FileHandler] = None
|
|
138
264
|
"""Log file handler
|
|
139
265
|
"""
|
|
140
266
|
self.logger_file = None
|
|
141
267
|
"""Debug file location
|
|
142
268
|
"""
|
|
143
|
-
|
|
269
|
+
if debug is not None:
|
|
270
|
+
self.debug = debug
|
|
271
|
+
else:
|
|
272
|
+
self.__debug = False
|
|
144
273
|
"""Debug switch
|
|
145
274
|
"""
|
|
146
275
|
|
|
@@ -152,6 +281,10 @@ conf = compute_api_client.Configuration(
|
|
|
152
281
|
self.ssl_ca_cert = ssl_ca_cert
|
|
153
282
|
"""Set this to customize the certificate file to verify the peer.
|
|
154
283
|
"""
|
|
284
|
+
self.ca_cert_data = ca_cert_data
|
|
285
|
+
"""Set this to verify the peer using PEM (str) or DER (bytes)
|
|
286
|
+
certificate data.
|
|
287
|
+
"""
|
|
155
288
|
self.cert_file = None
|
|
156
289
|
"""client certificate file
|
|
157
290
|
"""
|
|
@@ -171,7 +304,7 @@ conf = compute_api_client.Configuration(
|
|
|
171
304
|
Default values is 100, None means no-limit.
|
|
172
305
|
"""
|
|
173
306
|
|
|
174
|
-
self.proxy = None
|
|
307
|
+
self.proxy: Optional[str] = None
|
|
175
308
|
"""Proxy URL
|
|
176
309
|
"""
|
|
177
310
|
self.proxy_headers = None
|
|
@@ -180,7 +313,7 @@ conf = compute_api_client.Configuration(
|
|
|
180
313
|
self.safe_chars_for_path_param = ''
|
|
181
314
|
"""Safe chars for path_param
|
|
182
315
|
"""
|
|
183
|
-
self.retries =
|
|
316
|
+
self.retries = retries
|
|
184
317
|
"""Adding retries to override urllib3 default value 3
|
|
185
318
|
"""
|
|
186
319
|
# Enable client side validation
|
|
@@ -198,7 +331,7 @@ conf = compute_api_client.Configuration(
|
|
|
198
331
|
"""date format
|
|
199
332
|
"""
|
|
200
333
|
|
|
201
|
-
def __deepcopy__(self, memo):
|
|
334
|
+
def __deepcopy__(self, memo: Dict[int, Any]) -> Self:
|
|
202
335
|
cls = self.__class__
|
|
203
336
|
result = cls.__new__(cls)
|
|
204
337
|
memo[id(self)] = result
|
|
@@ -212,11 +345,11 @@ conf = compute_api_client.Configuration(
|
|
|
212
345
|
result.debug = self.debug
|
|
213
346
|
return result
|
|
214
347
|
|
|
215
|
-
def __setattr__(self, name, value):
|
|
348
|
+
def __setattr__(self, name: str, value: Any) -> None:
|
|
216
349
|
object.__setattr__(self, name, value)
|
|
217
350
|
|
|
218
351
|
@classmethod
|
|
219
|
-
def set_default(cls, default):
|
|
352
|
+
def set_default(cls, default: Optional[Self]) -> None:
|
|
220
353
|
"""Set default instance of configuration.
|
|
221
354
|
|
|
222
355
|
It stores default configuration, which can be
|
|
@@ -227,7 +360,7 @@ conf = compute_api_client.Configuration(
|
|
|
227
360
|
cls._default = default
|
|
228
361
|
|
|
229
362
|
@classmethod
|
|
230
|
-
def get_default_copy(cls):
|
|
363
|
+
def get_default_copy(cls) -> Self:
|
|
231
364
|
"""Deprecated. Please use `get_default` instead.
|
|
232
365
|
|
|
233
366
|
Deprecated. Please use `get_default` instead.
|
|
@@ -237,7 +370,7 @@ conf = compute_api_client.Configuration(
|
|
|
237
370
|
return cls.get_default()
|
|
238
371
|
|
|
239
372
|
@classmethod
|
|
240
|
-
def get_default(cls):
|
|
373
|
+
def get_default(cls) -> Self:
|
|
241
374
|
"""Return the default configuration.
|
|
242
375
|
|
|
243
376
|
This method returns newly created, based on default constructor,
|
|
@@ -247,11 +380,11 @@ conf = compute_api_client.Configuration(
|
|
|
247
380
|
:return: The configuration object.
|
|
248
381
|
"""
|
|
249
382
|
if cls._default is None:
|
|
250
|
-
cls._default =
|
|
383
|
+
cls._default = cls()
|
|
251
384
|
return cls._default
|
|
252
385
|
|
|
253
386
|
@property
|
|
254
|
-
def logger_file(self):
|
|
387
|
+
def logger_file(self) -> Optional[str]:
|
|
255
388
|
"""The logger file.
|
|
256
389
|
|
|
257
390
|
If the logger_file is None, then add stream handler and remove file
|
|
@@ -263,7 +396,7 @@ conf = compute_api_client.Configuration(
|
|
|
263
396
|
return self.__logger_file
|
|
264
397
|
|
|
265
398
|
@logger_file.setter
|
|
266
|
-
def logger_file(self, value):
|
|
399
|
+
def logger_file(self, value: Optional[str]) -> None:
|
|
267
400
|
"""The logger file.
|
|
268
401
|
|
|
269
402
|
If the logger_file is None, then add stream handler and remove file
|
|
@@ -282,7 +415,7 @@ conf = compute_api_client.Configuration(
|
|
|
282
415
|
logger.addHandler(self.logger_file_handler)
|
|
283
416
|
|
|
284
417
|
@property
|
|
285
|
-
def debug(self):
|
|
418
|
+
def debug(self) -> bool:
|
|
286
419
|
"""Debug status
|
|
287
420
|
|
|
288
421
|
:param value: The debug status, True or False.
|
|
@@ -291,7 +424,7 @@ conf = compute_api_client.Configuration(
|
|
|
291
424
|
return self.__debug
|
|
292
425
|
|
|
293
426
|
@debug.setter
|
|
294
|
-
def debug(self, value):
|
|
427
|
+
def debug(self, value: bool) -> None:
|
|
295
428
|
"""Debug status
|
|
296
429
|
|
|
297
430
|
:param value: The debug status, True or False.
|
|
@@ -313,7 +446,7 @@ conf = compute_api_client.Configuration(
|
|
|
313
446
|
httplib.HTTPConnection.debuglevel = 0
|
|
314
447
|
|
|
315
448
|
@property
|
|
316
|
-
def logger_format(self):
|
|
449
|
+
def logger_format(self) -> str:
|
|
317
450
|
"""The logger format.
|
|
318
451
|
|
|
319
452
|
The logger_formatter will be updated when sets logger_format.
|
|
@@ -324,7 +457,7 @@ conf = compute_api_client.Configuration(
|
|
|
324
457
|
return self.__logger_format
|
|
325
458
|
|
|
326
459
|
@logger_format.setter
|
|
327
|
-
def logger_format(self, value):
|
|
460
|
+
def logger_format(self, value: str) -> None:
|
|
328
461
|
"""The logger format.
|
|
329
462
|
|
|
330
463
|
The logger_formatter will be updated when sets logger_format.
|
|
@@ -335,7 +468,7 @@ conf = compute_api_client.Configuration(
|
|
|
335
468
|
self.__logger_format = value
|
|
336
469
|
self.logger_formatter = logging.Formatter(self.__logger_format)
|
|
337
470
|
|
|
338
|
-
def get_api_key_with_prefix(self, identifier, alias=None):
|
|
471
|
+
def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]:
|
|
339
472
|
"""Gets API key (with prefix if set).
|
|
340
473
|
|
|
341
474
|
:param identifier: The identifier of apiKey.
|
|
@@ -352,7 +485,9 @@ conf = compute_api_client.Configuration(
|
|
|
352
485
|
else:
|
|
353
486
|
return key
|
|
354
487
|
|
|
355
|
-
|
|
488
|
+
return None
|
|
489
|
+
|
|
490
|
+
def get_basic_auth_token(self) -> Optional[str]:
|
|
356
491
|
"""Gets HTTP basic authentication header (string).
|
|
357
492
|
|
|
358
493
|
:return: The token for basic HTTP authentication.
|
|
@@ -367,12 +502,12 @@ conf = compute_api_client.Configuration(
|
|
|
367
502
|
basic_auth=username + ':' + password
|
|
368
503
|
).get('authorization')
|
|
369
504
|
|
|
370
|
-
def auth_settings(self):
|
|
505
|
+
def auth_settings(self)-> AuthSettings:
|
|
371
506
|
"""Gets Auth Settings dict for api client.
|
|
372
507
|
|
|
373
508
|
:return: The Auth Settings information dict.
|
|
374
509
|
"""
|
|
375
|
-
auth = {}
|
|
510
|
+
auth: AuthSettings = {}
|
|
376
511
|
if self.access_token is not None:
|
|
377
512
|
auth['user_bearer'] = {
|
|
378
513
|
'type': 'oauth2',
|
|
@@ -391,7 +526,7 @@ conf = compute_api_client.Configuration(
|
|
|
391
526
|
}
|
|
392
527
|
return auth
|
|
393
528
|
|
|
394
|
-
def to_debug_report(self):
|
|
529
|
+
def to_debug_report(self) -> str:
|
|
395
530
|
"""Gets the essential information for debugging.
|
|
396
531
|
|
|
397
532
|
:return: The report for debugging.
|
|
@@ -403,7 +538,7 @@ conf = compute_api_client.Configuration(
|
|
|
403
538
|
"SDK Package Version: 1.0.0".\
|
|
404
539
|
format(env=sys.platform, pyversion=sys.version)
|
|
405
540
|
|
|
406
|
-
def get_host_settings(self):
|
|
541
|
+
def get_host_settings(self) -> List[HostSetting]:
|
|
407
542
|
"""Gets an array of host settings
|
|
408
543
|
|
|
409
544
|
:return: An array of host settings
|
|
@@ -415,7 +550,12 @@ conf = compute_api_client.Configuration(
|
|
|
415
550
|
}
|
|
416
551
|
]
|
|
417
552
|
|
|
418
|
-
def get_host_from_settings(
|
|
553
|
+
def get_host_from_settings(
|
|
554
|
+
self,
|
|
555
|
+
index: Optional[int],
|
|
556
|
+
variables: Optional[ServerVariablesT]=None,
|
|
557
|
+
servers: Optional[List[HostSetting]]=None,
|
|
558
|
+
) -> str:
|
|
419
559
|
"""Gets host URL based on the index and variables
|
|
420
560
|
:param index: array index of the host settings
|
|
421
561
|
:param variables: hash of variable and the corresponding value
|
|
@@ -455,12 +595,12 @@ conf = compute_api_client.Configuration(
|
|
|
455
595
|
return url
|
|
456
596
|
|
|
457
597
|
@property
|
|
458
|
-
def host(self):
|
|
598
|
+
def host(self) -> str:
|
|
459
599
|
"""Return generated host."""
|
|
460
600
|
return self.get_host_from_settings(self.server_index, variables=self.server_variables)
|
|
461
601
|
|
|
462
602
|
@host.setter
|
|
463
|
-
def host(self, value):
|
|
603
|
+
def host(self, value: str) -> None:
|
|
464
604
|
"""Fix base path."""
|
|
465
605
|
self._base_path = value
|
|
466
606
|
self.server_index = None
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
## Properties
|
|
5
|
+
|
|
5
6
|
Name | Type | Description | Notes
|
|
6
7
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**id** | **int** |
|
|
8
|
-
**project_id** | **int** |
|
|
9
|
-
**type** | [**AlgorithmType**](AlgorithmType.md) |
|
|
10
|
-
**shared** | [**ShareType**](ShareType.md) |
|
|
8
|
+
**id** | **int** | ID of the algorithm |
|
|
9
|
+
**project_id** | **int** | ID of the project |
|
|
10
|
+
**type** | [**AlgorithmType**](AlgorithmType.md) | The type of algorithm i.e. hybrid or quantum |
|
|
11
|
+
**shared** | [**ShareType**](ShareType.md) | The sharing scope of the algorithm |
|
|
11
12
|
**link** | **str** | |
|
|
12
|
-
**name** | **str** |
|
|
13
|
+
**name** | **str** | Name of the algorithm |
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
|
|
@@ -21,12 +22,12 @@ json = "{}"
|
|
|
21
22
|
# create an instance of Algorithm from a JSON string
|
|
22
23
|
algorithm_instance = Algorithm.from_json(json)
|
|
23
24
|
# print the JSON string representation of the object
|
|
24
|
-
print
|
|
25
|
+
print(Algorithm.to_json())
|
|
25
26
|
|
|
26
27
|
# convert the object into a dict
|
|
27
28
|
algorithm_dict = algorithm_instance.to_dict()
|
|
28
29
|
# create an instance of Algorithm from a dict
|
|
29
|
-
|
|
30
|
+
algorithm_from_dict = Algorithm.from_dict(algorithm_dict)
|
|
30
31
|
```
|
|
31
32
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
32
33
|
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
## Properties
|
|
5
|
+
|
|
5
6
|
Name | Type | Description | Notes
|
|
6
7
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**project_id** | **int** |
|
|
8
|
-
**type** | [**AlgorithmType**](AlgorithmType.md) |
|
|
9
|
-
**shared** | [**ShareType**](ShareType.md) |
|
|
8
|
+
**project_id** | **int** | ID of the project |
|
|
9
|
+
**type** | [**AlgorithmType**](AlgorithmType.md) | The type of algorithm i.e. hybrid or quantum |
|
|
10
|
+
**shared** | [**ShareType**](ShareType.md) | The sharing scope of the algorithm |
|
|
10
11
|
**link** | **str** | | [optional]
|
|
11
|
-
**name** | **str** |
|
|
12
|
+
**name** | **str** | The name of the algorithm |
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -20,12 +21,12 @@ json = "{}"
|
|
|
20
21
|
# create an instance of AlgorithmIn from a JSON string
|
|
21
22
|
algorithm_in_instance = AlgorithmIn.from_json(json)
|
|
22
23
|
# print the JSON string representation of the object
|
|
23
|
-
print
|
|
24
|
+
print(AlgorithmIn.to_json())
|
|
24
25
|
|
|
25
26
|
# convert the object into a dict
|
|
26
27
|
algorithm_in_dict = algorithm_in_instance.to_dict()
|
|
27
28
|
# create an instance of AlgorithmIn from a dict
|
|
28
|
-
|
|
29
|
+
algorithm_in_from_dict = AlgorithmIn.from_dict(algorithm_in_dict)
|
|
29
30
|
```
|
|
30
31
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
31
32
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# AlgorithmType
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
##
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
## Enum
|
|
5
|
+
|
|
6
|
+
* `HYBRID` (value: `'hybrid'`)
|
|
7
|
+
|
|
8
|
+
* `QUANTUM` (value: `'quantum'`)
|
|
7
9
|
|
|
8
10
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
9
11
|
|
|
@@ -21,9 +21,8 @@ Create new algorithm.
|
|
|
21
21
|
### Example
|
|
22
22
|
|
|
23
23
|
* OAuth Authentication (user_bearer):
|
|
24
|
+
|
|
24
25
|
```python
|
|
25
|
-
import time
|
|
26
|
-
import os
|
|
27
26
|
import compute_api_client
|
|
28
27
|
from compute_api_client.models.algorithm import Algorithm
|
|
29
28
|
from compute_api_client.models.algorithm_in import AlgorithmIn
|
|
@@ -62,6 +61,7 @@ async with compute_api_client.ApiClient(configuration) as api_client:
|
|
|
62
61
|
|
|
63
62
|
### Parameters
|
|
64
63
|
|
|
64
|
+
|
|
65
65
|
Name | Type | Description | Notes
|
|
66
66
|
------------- | ------------- | ------------- | -------------
|
|
67
67
|
**algorithm_in** | [**AlgorithmIn**](AlgorithmIn.md)| |
|
|
@@ -80,6 +80,7 @@ Name | Type | Description | Notes
|
|
|
80
80
|
- **Accept**: application/json
|
|
81
81
|
|
|
82
82
|
### HTTP response details
|
|
83
|
+
|
|
83
84
|
| Status code | Description | Response headers |
|
|
84
85
|
|-------------|-------------|------------------|
|
|
85
86
|
**201** | Successful Response | - |
|
|
@@ -97,9 +98,8 @@ Delete an algorithm.
|
|
|
97
98
|
### Example
|
|
98
99
|
|
|
99
100
|
* OAuth Authentication (user_bearer):
|
|
101
|
+
|
|
100
102
|
```python
|
|
101
|
-
import time
|
|
102
|
-
import os
|
|
103
103
|
import compute_api_client
|
|
104
104
|
from compute_api_client.rest import ApiException
|
|
105
105
|
from pprint import pprint
|
|
@@ -134,6 +134,7 @@ async with compute_api_client.ApiClient(configuration) as api_client:
|
|
|
134
134
|
|
|
135
135
|
### Parameters
|
|
136
136
|
|
|
137
|
+
|
|
137
138
|
Name | Type | Description | Notes
|
|
138
139
|
------------- | ------------- | ------------- | -------------
|
|
139
140
|
**id** | **int**| |
|
|
@@ -152,6 +153,7 @@ void (empty response body)
|
|
|
152
153
|
- **Accept**: application/json
|
|
153
154
|
|
|
154
155
|
### HTTP response details
|
|
156
|
+
|
|
155
157
|
| Status code | Description | Response headers |
|
|
156
158
|
|-------------|-------------|------------------|
|
|
157
159
|
**204** | Successful Response | - |
|
|
@@ -171,9 +173,8 @@ Get algorithm by ID.
|
|
|
171
173
|
|
|
172
174
|
* OAuth Authentication (user_bearer):
|
|
173
175
|
* Api Key Authentication (backend):
|
|
176
|
+
|
|
174
177
|
```python
|
|
175
|
-
import time
|
|
176
|
-
import os
|
|
177
178
|
import compute_api_client
|
|
178
179
|
from compute_api_client.models.algorithm import Algorithm
|
|
179
180
|
from compute_api_client.rest import ApiException
|
|
@@ -217,6 +218,7 @@ async with compute_api_client.ApiClient(configuration) as api_client:
|
|
|
217
218
|
|
|
218
219
|
### Parameters
|
|
219
220
|
|
|
221
|
+
|
|
220
222
|
Name | Type | Description | Notes
|
|
221
223
|
------------- | ------------- | ------------- | -------------
|
|
222
224
|
**id** | **int**| |
|
|
@@ -235,6 +237,7 @@ Name | Type | Description | Notes
|
|
|
235
237
|
- **Accept**: application/json
|
|
236
238
|
|
|
237
239
|
### HTTP response details
|
|
240
|
+
|
|
238
241
|
| Status code | Description | Response headers |
|
|
239
242
|
|-------------|-------------|------------------|
|
|
240
243
|
**200** | Successful Response | - |
|
|
@@ -253,9 +256,8 @@ List algorithms.
|
|
|
253
256
|
### Example
|
|
254
257
|
|
|
255
258
|
* OAuth Authentication (user_bearer):
|
|
259
|
+
|
|
256
260
|
```python
|
|
257
|
-
import time
|
|
258
|
-
import os
|
|
259
261
|
import compute_api_client
|
|
260
262
|
from compute_api_client.models.algorithm_type import AlgorithmType
|
|
261
263
|
from compute_api_client.models.page_algorithm import PageAlgorithm
|
|
@@ -306,6 +308,7 @@ async with compute_api_client.ApiClient(configuration) as api_client:
|
|
|
306
308
|
|
|
307
309
|
### Parameters
|
|
308
310
|
|
|
311
|
+
|
|
309
312
|
Name | Type | Description | Notes
|
|
310
313
|
------------- | ------------- | ------------- | -------------
|
|
311
314
|
**search** | **str**| Substring search for algorithm names | [optional]
|
|
@@ -335,6 +338,7 @@ Name | Type | Description | Notes
|
|
|
335
338
|
- **Accept**: application/json
|
|
336
339
|
|
|
337
340
|
### HTTP response details
|
|
341
|
+
|
|
338
342
|
| Status code | Description | Response headers |
|
|
339
343
|
|-------------|-------------|------------------|
|
|
340
344
|
**200** | Successful Response | - |
|
|
@@ -352,9 +356,8 @@ Update an algorithm.
|
|
|
352
356
|
### Example
|
|
353
357
|
|
|
354
358
|
* OAuth Authentication (user_bearer):
|
|
359
|
+
|
|
355
360
|
```python
|
|
356
|
-
import time
|
|
357
|
-
import os
|
|
358
361
|
import compute_api_client
|
|
359
362
|
from compute_api_client.models.algorithm import Algorithm
|
|
360
363
|
from compute_api_client.models.algorithm_in import AlgorithmIn
|
|
@@ -394,6 +397,7 @@ async with compute_api_client.ApiClient(configuration) as api_client:
|
|
|
394
397
|
|
|
395
398
|
### Parameters
|
|
396
399
|
|
|
400
|
+
|
|
397
401
|
Name | Type | Description | Notes
|
|
398
402
|
------------- | ------------- | ------------- | -------------
|
|
399
403
|
**id** | **int**| |
|
|
@@ -413,6 +417,7 @@ Name | Type | Description | Notes
|
|
|
413
417
|
- **Accept**: application/json
|
|
414
418
|
|
|
415
419
|
### HTTP response details
|
|
420
|
+
|
|
416
421
|
| Status code | Description | Response headers |
|
|
417
422
|
|-------------|-------------|------------------|
|
|
418
423
|
**200** | Successful Response | - |
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
## Properties
|
|
5
|
+
|
|
5
6
|
Name | Type | Description | Notes
|
|
6
7
|
------------ | ------------- | ------------- | -------------
|
|
7
8
|
**client_id** | **str** | |
|
|
@@ -18,12 +19,12 @@ json = "{}"
|
|
|
18
19
|
# create an instance of AuthConfig from a JSON string
|
|
19
20
|
auth_config_instance = AuthConfig.from_json(json)
|
|
20
21
|
# print the JSON string representation of the object
|
|
21
|
-
print
|
|
22
|
+
print(AuthConfig.to_json())
|
|
22
23
|
|
|
23
24
|
# convert the object into a dict
|
|
24
25
|
auth_config_dict = auth_config_instance.to_dict()
|
|
25
26
|
# create an instance of AuthConfig from a dict
|
|
26
|
-
|
|
27
|
+
auth_config_from_dict = AuthConfig.from_dict(auth_config_dict)
|
|
27
28
|
```
|
|
28
29
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
29
30
|
|
|
@@ -14,9 +14,8 @@ Get suggested authentication configuration
|
|
|
14
14
|
|
|
15
15
|
### Example
|
|
16
16
|
|
|
17
|
+
|
|
17
18
|
```python
|
|
18
|
-
import time
|
|
19
|
-
import os
|
|
20
19
|
import compute_api_client
|
|
21
20
|
from compute_api_client.models.auth_config import AuthConfig
|
|
22
21
|
from compute_api_client.rest import ApiException
|
|
@@ -46,6 +45,7 @@ async with compute_api_client.ApiClient(configuration) as api_client:
|
|
|
46
45
|
|
|
47
46
|
|
|
48
47
|
### Parameters
|
|
48
|
+
|
|
49
49
|
This endpoint does not need any parameter.
|
|
50
50
|
|
|
51
51
|
### Return type
|
|
@@ -62,6 +62,7 @@ No authorization required
|
|
|
62
62
|
- **Accept**: application/json
|
|
63
63
|
|
|
64
64
|
### HTTP response details
|
|
65
|
+
|
|
65
66
|
| Status code | Description | Response headers |
|
|
66
67
|
|-------------|-------------|------------------|
|
|
67
68
|
**200** | Successful Response | - |
|