qi-compute-api-client 0.4.0__py3-none-any.whl → 0.17.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 +23 -20
- compute_api_client/api/__init__.py +5 -6
- compute_api_client/api/algorithms_api.py +1334 -554
- compute_api_client/api/backend_api.py +1501 -0
- compute_api_client/api/backend_types_api.py +684 -0
- compute_api_client/api/batch_jobs_api.py +1937 -0
- compute_api_client/api/commits_api.py +1069 -436
- compute_api_client/api/files_api.py +1076 -436
- compute_api_client/api/final_results_api.py +737 -339
- compute_api_client/api/jobs_api.py +1653 -0
- compute_api_client/api/languages_api.py +557 -218
- compute_api_client/api/members_api.py +1058 -436
- compute_api_client/api/metadata_api.py +737 -338
- compute_api_client/api/permissions_api.py +1056 -422
- compute_api_client/api/projects_api.py +1605 -677
- compute_api_client/api/reservations_api.py +1125 -428
- compute_api_client/api/results_api.py +739 -338
- compute_api_client/api/teams_api.py +568 -221
- compute_api_client/api/transactions_api.py +680 -219
- compute_api_client/api/users_api.py +1091 -436
- compute_api_client/api_client.py +347 -305
- compute_api_client/api_response.py +21 -0
- compute_api_client/configuration.py +55 -68
- compute_api_client/docs/Algorithm.md +20 -3
- compute_api_client/docs/AlgorithmIn.md +20 -3
- compute_api_client/docs/AlgorithmType.md +0 -1
- compute_api_client/docs/AlgorithmsApi.md +78 -77
- compute_api_client/docs/Backend.md +33 -0
- compute_api_client/docs/BackendApi.md +419 -0
- compute_api_client/docs/BackendPatch.md +29 -0
- compute_api_client/docs/{RunStatus.md → BackendStatus.md} +1 -2
- compute_api_client/docs/BackendType.md +36 -0
- compute_api_client/docs/{RuntimeTypesApi.md → BackendTypesApi.md} +58 -31
- compute_api_client/docs/BackendWithAuthentication.md +34 -0
- compute_api_client/docs/BatchJob.md +38 -0
- compute_api_client/docs/BatchJobIn.md +29 -0
- compute_api_client/docs/{RuntimeStatus.md → BatchJobStatus.md} +1 -2
- compute_api_client/docs/BatchJobsApi.md +524 -0
- compute_api_client/docs/Commit.md +18 -1
- compute_api_client/docs/CommitIn.md +17 -0
- compute_api_client/docs/CommitsApi.md +62 -71
- compute_api_client/docs/CompileStage.md +0 -1
- compute_api_client/docs/Domain.md +0 -1
- compute_api_client/docs/File.md +21 -4
- compute_api_client/docs/FileIn.md +21 -4
- compute_api_client/docs/FilesApi.md +65 -71
- compute_api_client/docs/FinalResult.md +20 -3
- compute_api_client/docs/FinalResultIn.md +19 -2
- compute_api_client/docs/FinalResultsApi.md +44 -71
- compute_api_client/docs/HTTPNotFoundError.md +17 -0
- compute_api_client/docs/HTTPValidationError.md +18 -1
- compute_api_client/docs/Job.md +36 -0
- compute_api_client/docs/JobIn.md +31 -0
- compute_api_client/docs/JobPatch.md +28 -0
- compute_api_client/docs/{BatchRunStatus.md → JobStatus.md} +1 -2
- compute_api_client/docs/{RunsApi.md → JobsApi.md} +137 -122
- compute_api_client/docs/Language.md +17 -0
- compute_api_client/docs/LanguagesApi.md +30 -12
- compute_api_client/docs/LocationInner.md +17 -0
- compute_api_client/docs/Member.md +19 -2
- compute_api_client/docs/MemberIn.md +19 -2
- compute_api_client/docs/MembersApi.md +59 -24
- compute_api_client/docs/Metadata.md +20 -3
- compute_api_client/docs/MetadataApi.md +49 -33
- compute_api_client/docs/MetadataIn.md +19 -2
- compute_api_client/docs/Permission.md +17 -0
- compute_api_client/docs/PermissionGroup.md +17 -0
- compute_api_client/docs/PermissionsApi.md +68 -28
- compute_api_client/docs/Project.md +20 -3
- compute_api_client/docs/ProjectIn.md +18 -1
- compute_api_client/docs/ProjectPatch.md +19 -2
- compute_api_client/docs/ProjectsApi.md +84 -36
- compute_api_client/docs/Reservation.md +21 -4
- compute_api_client/docs/ReservationIn.md +19 -2
- compute_api_client/docs/ReservationsApi.md +66 -24
- compute_api_client/docs/Result.md +23 -6
- compute_api_client/docs/ResultIn.md +19 -2
- compute_api_client/docs/ResultsApi.md +40 -74
- compute_api_client/docs/Role.md +0 -1
- compute_api_client/docs/ShareType.md +0 -1
- compute_api_client/docs/Team.md +18 -1
- compute_api_client/docs/TeamsApi.md +37 -14
- compute_api_client/docs/Transaction.md +21 -4
- compute_api_client/docs/TransactionsApi.md +50 -14
- compute_api_client/docs/User.md +21 -4
- compute_api_client/docs/UserIn.md +17 -0
- compute_api_client/docs/UsersApi.md +62 -24
- compute_api_client/docs/ValidationError.md +18 -1
- compute_api_client/exceptions.py +20 -17
- compute_api_client/models/__init__.py +17 -15
- compute_api_client/models/algorithm.py +79 -238
- compute_api_client/models/algorithm_in.py +77 -205
- compute_api_client/models/algorithm_type.py +22 -88
- compute_api_client/models/backend.py +100 -0
- compute_api_client/models/backend_patch.py +90 -0
- compute_api_client/models/backend_status.py +47 -0
- compute_api_client/models/backend_type.py +105 -0
- compute_api_client/models/backend_with_authentication.py +102 -0
- compute_api_client/models/batch_job.py +129 -0
- compute_api_client/models/batch_job_in.py +89 -0
- compute_api_client/models/batch_job_status.py +48 -0
- compute_api_client/models/commit.py +73 -231
- compute_api_client/models/commit_in.py +68 -170
- compute_api_client/models/compile_stage.py +24 -90
- compute_api_client/models/domain.py +23 -89
- compute_api_client/models/file.py +75 -289
- compute_api_client/models/file_in.py +73 -255
- compute_api_client/models/final_result.py +69 -199
- compute_api_client/models/final_result_in.py +64 -138
- compute_api_client/models/http_not_found_error.py +61 -106
- compute_api_client/models/http_validation_error.py +70 -106
- compute_api_client/models/job.py +120 -0
- compute_api_client/models/job_in.py +99 -0
- compute_api_client/models/job_patch.py +88 -0
- compute_api_client/models/job_status.py +48 -0
- compute_api_client/models/language.py +68 -173
- compute_api_client/models/location_inner.py +126 -85
- compute_api_client/models/member.py +71 -237
- compute_api_client/models/member_in.py +69 -204
- compute_api_client/models/metadata.py +69 -199
- compute_api_client/models/metadata_in.py +69 -138
- compute_api_client/models/permission.py +68 -173
- compute_api_client/models/permission_group.py +66 -143
- compute_api_client/models/project.py +75 -257
- compute_api_client/models/project_in.py +70 -196
- compute_api_client/models/project_patch.py +90 -193
- compute_api_client/models/reservation.py +80 -291
- compute_api_client/models/reservation_in.py +69 -201
- compute_api_client/models/result.py +102 -360
- compute_api_client/models/result_in.py +96 -293
- compute_api_client/models/role.py +22 -88
- compute_api_client/models/share_type.py +23 -89
- compute_api_client/models/team.py +70 -199
- compute_api_client/models/transaction.py +94 -300
- compute_api_client/models/user.py +76 -277
- compute_api_client/models/user_in.py +74 -244
- compute_api_client/models/validation_error.py +74 -161
- compute_api_client/rest.py +56 -115
- {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/METADATA +47 -40
- qi_compute_api_client-0.17.0.dist-info/RECORD +142 -0
- compute_api_client/api/batch_runs_api.py +0 -862
- compute_api_client/api/runs_api.py +0 -723
- compute_api_client/api/runtime_api.py +0 -449
- compute_api_client/api/runtime_types_api.py +0 -303
- compute_api_client/docs/BatchRun.md +0 -21
- compute_api_client/docs/BatchRunIn.md +0 -12
- compute_api_client/docs/BatchRunsApi.md +0 -600
- compute_api_client/docs/Run.md +0 -18
- compute_api_client/docs/RunIn.md +0 -13
- compute_api_client/docs/Runtime.md +0 -16
- compute_api_client/docs/RuntimeApi.md +0 -229
- compute_api_client/docs/RuntimeType.md +0 -19
- compute_api_client/docs/RuntimeWithAuthentication.md +0 -17
- compute_api_client/models/batch_run.py +0 -423
- compute_api_client/models/batch_run_in.py +0 -171
- compute_api_client/models/batch_run_status.py +0 -114
- compute_api_client/models/run.py +0 -345
- compute_api_client/models/run_in.py +0 -202
- compute_api_client/models/run_status.py +0 -114
- compute_api_client/models/runtime.py +0 -290
- compute_api_client/models/runtime_status.py +0 -113
- compute_api_client/models/runtime_type.py +0 -357
- compute_api_client/models/runtime_with_authentication.py +0 -320
- qi_compute_api_client-0.4.0.dist-info/RECORD +0 -137
- {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/LICENSE.md +0 -0
- {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""API response object."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from typing import Any, Dict, Optional, Generic, TypeVar
|
|
5
|
+
from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T")
|
|
8
|
+
|
|
9
|
+
class ApiResponse(BaseModel, Generic[T]):
|
|
10
|
+
"""
|
|
11
|
+
API response object
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
status_code: StrictInt = Field(description="HTTP status code")
|
|
15
|
+
headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers")
|
|
16
|
+
data: T = Field(description="Deserialized data given the data type")
|
|
17
|
+
raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")
|
|
18
|
+
|
|
19
|
+
model_config = {
|
|
20
|
+
"arbitrary_types_allowed": True
|
|
21
|
+
}
|
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
Quantum Inspire 2
|
|
5
5
|
|
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: 0.1.0
|
|
9
|
-
Generated by
|
|
10
|
-
"""
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
10
|
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
12
13
|
|
|
13
|
-
from __future__ import absolute_import
|
|
14
14
|
|
|
15
15
|
import copy
|
|
16
16
|
import logging
|
|
17
17
|
import sys
|
|
18
18
|
import urllib3
|
|
19
19
|
|
|
20
|
-
import
|
|
21
|
-
from six.moves import http_client as httplib
|
|
22
|
-
from compute_api_client.exceptions import ApiValueError
|
|
23
|
-
|
|
20
|
+
import http.client as httplib
|
|
24
21
|
|
|
25
22
|
JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
|
26
23
|
'multipleOf', 'maximum', 'exclusiveMaximum',
|
|
@@ -28,46 +25,20 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
|
|
28
25
|
'minLength', 'pattern', 'maxItems', 'minItems'
|
|
29
26
|
}
|
|
30
27
|
|
|
31
|
-
class Configuration
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
Ref: https://openapi-generator.tech
|
|
35
|
-
Do not edit the class manually.
|
|
28
|
+
class Configuration:
|
|
29
|
+
"""This class contains various settings of the API client.
|
|
36
30
|
|
|
37
|
-
:param host: Base url
|
|
31
|
+
:param host: Base url.
|
|
38
32
|
:param api_key: Dict to store API key(s).
|
|
39
33
|
Each entry in the dict specifies an API key.
|
|
40
34
|
The dict key is the name of the security scheme in the OAS specification.
|
|
41
35
|
The dict value is the API key secret.
|
|
42
|
-
:param api_key_prefix: Dict to store API prefix (e.g. Bearer)
|
|
36
|
+
:param api_key_prefix: Dict to store API prefix (e.g. Bearer).
|
|
43
37
|
The dict key is the name of the security scheme in the OAS specification.
|
|
44
38
|
The dict value is an API key prefix when generating the auth data.
|
|
45
|
-
:param username: Username for HTTP basic authentication
|
|
46
|
-
:param password: Password for HTTP basic authentication
|
|
47
|
-
:param
|
|
48
|
-
unknown properties. A server may send a response that includes additional
|
|
49
|
-
properties that are not known by the client in the following scenarios:
|
|
50
|
-
1. The OpenAPI document is incomplete, i.e. it does not match the server
|
|
51
|
-
implementation.
|
|
52
|
-
2. The client was generated using an older version of the OpenAPI document
|
|
53
|
-
and the server has been upgraded since then.
|
|
54
|
-
If a schema in the OpenAPI document defines the additionalProperties attribute,
|
|
55
|
-
then all undeclared properties received by the server are injected into the
|
|
56
|
-
additional properties map. In that case, there are undeclared properties, and
|
|
57
|
-
nothing to discard.
|
|
58
|
-
:param disabled_client_side_validations (string): Comma-separated list of
|
|
59
|
-
JSON schema validation keywords to disable JSON schema structural validation
|
|
60
|
-
rules. The following keywords may be specified: multipleOf, maximum,
|
|
61
|
-
exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern,
|
|
62
|
-
maxItems, minItems.
|
|
63
|
-
By default, the validation is performed for data generated locally by the client
|
|
64
|
-
and data received from the server, independent of any validation performed by
|
|
65
|
-
the server side. If the input data does not satisfy the JSON schema validation
|
|
66
|
-
rules specified in the OpenAPI document, an exception is raised.
|
|
67
|
-
If disabled_client_side_validations is set, structural validation is
|
|
68
|
-
disabled. This can be useful to troubleshoot data validation problem, such as
|
|
69
|
-
when the OpenAPI document validation rules do not match the actual API data
|
|
70
|
-
received by the server.
|
|
39
|
+
:param username: Username for HTTP basic authentication.
|
|
40
|
+
:param password: Password for HTTP basic authentication.
|
|
41
|
+
:param access_token: Access token.
|
|
71
42
|
:param server_index: Index to servers configuration.
|
|
72
43
|
:param server_variables: Mapping with string values to replace variables in
|
|
73
44
|
templated server configuration. The validation of enums is performed for
|
|
@@ -76,9 +47,10 @@ class Configuration(object):
|
|
|
76
47
|
configuration.
|
|
77
48
|
:param server_operation_variables: Mapping from operation ID to a mapping with
|
|
78
49
|
string values to replace variables in templated server configuration.
|
|
79
|
-
The validation of enums is performed for variables with defined enum
|
|
50
|
+
The validation of enums is performed for variables with defined enum
|
|
51
|
+
values before.
|
|
80
52
|
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
|
|
81
|
-
in PEM format
|
|
53
|
+
in PEM format.
|
|
82
54
|
|
|
83
55
|
:Example:
|
|
84
56
|
|
|
@@ -107,12 +79,11 @@ conf = compute_api_client.Configuration(
|
|
|
107
79
|
def __init__(self, host=None,
|
|
108
80
|
api_key=None, api_key_prefix=None,
|
|
109
81
|
username=None, password=None,
|
|
110
|
-
|
|
111
|
-
disabled_client_side_validations="",
|
|
82
|
+
access_token=None,
|
|
112
83
|
server_index=None, server_variables=None,
|
|
113
84
|
server_operation_index=None, server_operation_variables=None,
|
|
114
85
|
ssl_ca_cert=None,
|
|
115
|
-
):
|
|
86
|
+
) -> None:
|
|
116
87
|
"""Constructor
|
|
117
88
|
"""
|
|
118
89
|
self._base_path = "http://localhost" if host is None else host
|
|
@@ -149,8 +120,9 @@ conf = compute_api_client.Configuration(
|
|
|
149
120
|
self.password = password
|
|
150
121
|
"""Password for HTTP basic authentication
|
|
151
122
|
"""
|
|
152
|
-
self.
|
|
153
|
-
|
|
123
|
+
self.access_token = access_token
|
|
124
|
+
"""Access token
|
|
125
|
+
"""
|
|
154
126
|
self.logger = {}
|
|
155
127
|
"""Logging Settings
|
|
156
128
|
"""
|
|
@@ -189,6 +161,10 @@ conf = compute_api_client.Configuration(
|
|
|
189
161
|
self.assert_hostname = None
|
|
190
162
|
"""Set this to True/False to enable/disable SSL hostname verification.
|
|
191
163
|
"""
|
|
164
|
+
self.tls_server_name = None
|
|
165
|
+
"""SSL/TLS Server Name Indication (SNI)
|
|
166
|
+
Set this to the SNI value expected by the server.
|
|
167
|
+
"""
|
|
192
168
|
|
|
193
169
|
self.connection_pool_maxsize = 100
|
|
194
170
|
"""This value is passed to the aiohttp to limit simultaneous connections.
|
|
@@ -214,6 +190,14 @@ conf = compute_api_client.Configuration(
|
|
|
214
190
|
"""Options to pass down to the underlying urllib3 socket
|
|
215
191
|
"""
|
|
216
192
|
|
|
193
|
+
self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z"
|
|
194
|
+
"""datetime format
|
|
195
|
+
"""
|
|
196
|
+
|
|
197
|
+
self.date_format = "%Y-%m-%d"
|
|
198
|
+
"""date format
|
|
199
|
+
"""
|
|
200
|
+
|
|
217
201
|
def __deepcopy__(self, memo):
|
|
218
202
|
cls = self.__class__
|
|
219
203
|
result = cls.__new__(cls)
|
|
@@ -230,13 +214,6 @@ conf = compute_api_client.Configuration(
|
|
|
230
214
|
|
|
231
215
|
def __setattr__(self, name, value):
|
|
232
216
|
object.__setattr__(self, name, value)
|
|
233
|
-
if name == 'disabled_client_side_validations':
|
|
234
|
-
s = set(filter(None, value.split(',')))
|
|
235
|
-
for v in s:
|
|
236
|
-
if v not in JSON_SCHEMA_VALIDATION_KEYWORDS:
|
|
237
|
-
raise ApiValueError(
|
|
238
|
-
"Invalid keyword: '{0}''".format(v))
|
|
239
|
-
self._disabled_client_side_validations = s
|
|
240
217
|
|
|
241
218
|
@classmethod
|
|
242
219
|
def set_default(cls, default):
|
|
@@ -247,21 +224,31 @@ conf = compute_api_client.Configuration(
|
|
|
247
224
|
|
|
248
225
|
:param default: object of Configuration
|
|
249
226
|
"""
|
|
250
|
-
cls._default =
|
|
227
|
+
cls._default = default
|
|
251
228
|
|
|
252
229
|
@classmethod
|
|
253
230
|
def get_default_copy(cls):
|
|
254
|
-
"""
|
|
231
|
+
"""Deprecated. Please use `get_default` instead.
|
|
232
|
+
|
|
233
|
+
Deprecated. Please use `get_default` instead.
|
|
234
|
+
|
|
235
|
+
:return: The configuration object.
|
|
236
|
+
"""
|
|
237
|
+
return cls.get_default()
|
|
238
|
+
|
|
239
|
+
@classmethod
|
|
240
|
+
def get_default(cls):
|
|
241
|
+
"""Return the default configuration.
|
|
255
242
|
|
|
256
243
|
This method returns newly created, based on default constructor,
|
|
257
244
|
object of Configuration class or returns a copy of default
|
|
258
|
-
configuration
|
|
245
|
+
configuration.
|
|
259
246
|
|
|
260
247
|
:return: The configuration object.
|
|
261
248
|
"""
|
|
262
|
-
if cls._default is
|
|
263
|
-
|
|
264
|
-
return
|
|
249
|
+
if cls._default is None:
|
|
250
|
+
cls._default = Configuration()
|
|
251
|
+
return cls._default
|
|
265
252
|
|
|
266
253
|
@property
|
|
267
254
|
def logger_file(self):
|
|
@@ -291,7 +278,7 @@ conf = compute_api_client.Configuration(
|
|
|
291
278
|
# then add file handler and remove stream handler.
|
|
292
279
|
self.logger_file_handler = logging.FileHandler(self.__logger_file)
|
|
293
280
|
self.logger_file_handler.setFormatter(self.logger_formatter)
|
|
294
|
-
for _, logger in
|
|
281
|
+
for _, logger in self.logger.items():
|
|
295
282
|
logger.addHandler(self.logger_file_handler)
|
|
296
283
|
|
|
297
284
|
@property
|
|
@@ -313,14 +300,14 @@ conf = compute_api_client.Configuration(
|
|
|
313
300
|
self.__debug = value
|
|
314
301
|
if self.__debug:
|
|
315
302
|
# if debug status is True, turn on debug logging
|
|
316
|
-
for _, logger in
|
|
303
|
+
for _, logger in self.logger.items():
|
|
317
304
|
logger.setLevel(logging.DEBUG)
|
|
318
305
|
# turn on httplib debug
|
|
319
306
|
httplib.HTTPConnection.debuglevel = 1
|
|
320
307
|
else:
|
|
321
308
|
# if debug status is False, turn off debug logging,
|
|
322
309
|
# setting log level to default `logging.WARNING`
|
|
323
|
-
for _, logger in
|
|
310
|
+
for _, logger in self.logger.items():
|
|
324
311
|
logger.setLevel(logging.WARNING)
|
|
325
312
|
# turn off httplib debug
|
|
326
313
|
httplib.HTTPConnection.debuglevel = 0
|
|
@@ -395,13 +382,13 @@ conf = compute_api_client.Configuration(
|
|
|
395
382
|
'user',
|
|
396
383
|
),
|
|
397
384
|
}
|
|
398
|
-
if '
|
|
399
|
-
auth['
|
|
385
|
+
if 'backend' in self.api_key:
|
|
386
|
+
auth['backend'] = {
|
|
400
387
|
'type': 'api_key',
|
|
401
388
|
'in': 'header',
|
|
402
389
|
'key': 'Authorization',
|
|
403
390
|
'value': self.get_api_key_with_prefix(
|
|
404
|
-
'
|
|
391
|
+
'backend',
|
|
405
392
|
),
|
|
406
393
|
}
|
|
407
394
|
return auth
|
|
@@ -5,11 +5,28 @@
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**id** | **int** | |
|
|
8
|
-
**type** | [**AlgorithmType**](AlgorithmType.md) | HYBRID: hybrid<br/>QUANTUM: quantum |
|
|
9
|
-
**shared** | [**ShareType**](ShareType.md) | PRIVATE: private<br/>LINK_ONLY: link_only<br/>TEAM: team |
|
|
10
|
-
**link** | **str** | | [optional]
|
|
11
8
|
**project_id** | **int** | |
|
|
9
|
+
**type** | [**AlgorithmType**](AlgorithmType.md) | |
|
|
10
|
+
**shared** | [**ShareType**](ShareType.md) | |
|
|
11
|
+
**link** | **str** | |
|
|
12
12
|
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from compute_api_client.models.algorithm import Algorithm
|
|
17
|
+
|
|
18
|
+
# TODO update the JSON string below
|
|
19
|
+
json = "{}"
|
|
20
|
+
# create an instance of Algorithm from a JSON string
|
|
21
|
+
algorithm_instance = Algorithm.from_json(json)
|
|
22
|
+
# print the JSON string representation of the object
|
|
23
|
+
print Algorithm.to_json()
|
|
24
|
+
|
|
25
|
+
# convert the object into a dict
|
|
26
|
+
algorithm_dict = algorithm_instance.to_dict()
|
|
27
|
+
# create an instance of Algorithm from a dict
|
|
28
|
+
algorithm_form_dict = algorithm.from_dict(algorithm_dict)
|
|
29
|
+
```
|
|
13
30
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
14
31
|
|
|
15
32
|
|
|
@@ -4,11 +4,28 @@
|
|
|
4
4
|
## Properties
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**type** | [**AlgorithmType**](AlgorithmType.md) | HYBRID: hybrid<br/>QUANTUM: quantum |
|
|
8
|
-
**shared** | [**ShareType**](ShareType.md) | PRIVATE: private<br/>LINK_ONLY: link_only<br/>TEAM: team |
|
|
9
|
-
**link** | **str** | | [optional]
|
|
10
7
|
**project_id** | **int** | |
|
|
8
|
+
**type** | [**AlgorithmType**](AlgorithmType.md) | |
|
|
9
|
+
**shared** | [**ShareType**](ShareType.md) | |
|
|
10
|
+
**link** | **str** | | [optional]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
from compute_api_client.models.algorithm_in import AlgorithmIn
|
|
16
|
+
|
|
17
|
+
# TODO update the JSON string below
|
|
18
|
+
json = "{}"
|
|
19
|
+
# create an instance of AlgorithmIn from a JSON string
|
|
20
|
+
algorithm_in_instance = AlgorithmIn.from_json(json)
|
|
21
|
+
# print the JSON string representation of the object
|
|
22
|
+
print AlgorithmIn.to_json()
|
|
11
23
|
|
|
24
|
+
# convert the object into a dict
|
|
25
|
+
algorithm_in_dict = algorithm_in_instance.to_dict()
|
|
26
|
+
# create an instance of AlgorithmIn from a dict
|
|
27
|
+
algorithm_in_form_dict = algorithm_in.from_dict(algorithm_in_dict)
|
|
28
|
+
```
|
|
12
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)
|
|
13
30
|
|
|
14
31
|
|
|
@@ -22,11 +22,14 @@ Create new algorithm.
|
|
|
22
22
|
|
|
23
23
|
* Api Key Authentication (user):
|
|
24
24
|
```python
|
|
25
|
-
from __future__ import print_function
|
|
26
25
|
import time
|
|
26
|
+
import os
|
|
27
27
|
import compute_api_client
|
|
28
|
+
from compute_api_client.models.algorithm import Algorithm
|
|
29
|
+
from compute_api_client.models.algorithm_in import AlgorithmIn
|
|
28
30
|
from compute_api_client.rest import ApiException
|
|
29
31
|
from pprint import pprint
|
|
32
|
+
|
|
30
33
|
# Defining the host is optional and defaults to http://localhost
|
|
31
34
|
# See configuration.py for a list of all supported configuration parameters.
|
|
32
35
|
configuration = compute_api_client.Configuration(
|
|
@@ -39,25 +42,28 @@ configuration = compute_api_client.Configuration(
|
|
|
39
42
|
# satisfies your auth use case.
|
|
40
43
|
|
|
41
44
|
# Configure API key authorization: user
|
|
42
|
-
configuration.api_key['user'] =
|
|
45
|
+
configuration.api_key['user'] = os.environ["API_KEY"]
|
|
43
46
|
|
|
44
47
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
45
48
|
# configuration.api_key_prefix['user'] = 'Bearer'
|
|
46
49
|
|
|
47
50
|
# Enter a context with an instance of the API client
|
|
48
|
-
with compute_api_client.ApiClient(configuration) as api_client:
|
|
51
|
+
async with compute_api_client.ApiClient(configuration) as api_client:
|
|
49
52
|
# Create an instance of the API class
|
|
50
53
|
api_instance = compute_api_client.AlgorithmsApi(api_client)
|
|
51
54
|
algorithm_in = compute_api_client.AlgorithmIn() # AlgorithmIn |
|
|
52
55
|
|
|
53
56
|
try:
|
|
54
57
|
# Create algorithm
|
|
55
|
-
api_response = api_instance.create_algorithm_algorithms_post(algorithm_in)
|
|
58
|
+
api_response = await api_instance.create_algorithm_algorithms_post(algorithm_in)
|
|
59
|
+
print("The response of AlgorithmsApi->create_algorithm_algorithms_post:\n")
|
|
56
60
|
pprint(api_response)
|
|
57
|
-
except
|
|
61
|
+
except Exception as e:
|
|
58
62
|
print("Exception when calling AlgorithmsApi->create_algorithm_algorithms_post: %s\n" % e)
|
|
59
63
|
```
|
|
60
64
|
|
|
65
|
+
|
|
66
|
+
|
|
61
67
|
### Parameters
|
|
62
68
|
|
|
63
69
|
Name | Type | Description | Notes
|
|
@@ -96,11 +102,12 @@ Delete an algorithm.
|
|
|
96
102
|
|
|
97
103
|
* Api Key Authentication (user):
|
|
98
104
|
```python
|
|
99
|
-
from __future__ import print_function
|
|
100
105
|
import time
|
|
106
|
+
import os
|
|
101
107
|
import compute_api_client
|
|
102
108
|
from compute_api_client.rest import ApiException
|
|
103
109
|
from pprint import pprint
|
|
110
|
+
|
|
104
111
|
# Defining the host is optional and defaults to http://localhost
|
|
105
112
|
# See configuration.py for a list of all supported configuration parameters.
|
|
106
113
|
configuration = compute_api_client.Configuration(
|
|
@@ -113,24 +120,26 @@ configuration = compute_api_client.Configuration(
|
|
|
113
120
|
# satisfies your auth use case.
|
|
114
121
|
|
|
115
122
|
# Configure API key authorization: user
|
|
116
|
-
configuration.api_key['user'] =
|
|
123
|
+
configuration.api_key['user'] = os.environ["API_KEY"]
|
|
117
124
|
|
|
118
125
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
119
126
|
# configuration.api_key_prefix['user'] = 'Bearer'
|
|
120
127
|
|
|
121
128
|
# Enter a context with an instance of the API client
|
|
122
|
-
with compute_api_client.ApiClient(configuration) as api_client:
|
|
129
|
+
async with compute_api_client.ApiClient(configuration) as api_client:
|
|
123
130
|
# Create an instance of the API class
|
|
124
131
|
api_instance = compute_api_client.AlgorithmsApi(api_client)
|
|
125
132
|
id = 56 # int |
|
|
126
133
|
|
|
127
134
|
try:
|
|
128
135
|
# Destroy algorithm
|
|
129
|
-
api_instance.delete_algorithm_algorithms_id_delete(id)
|
|
130
|
-
except
|
|
136
|
+
await api_instance.delete_algorithm_algorithms_id_delete(id)
|
|
137
|
+
except Exception as e:
|
|
131
138
|
print("Exception when calling AlgorithmsApi->delete_algorithm_algorithms_id_delete: %s\n" % e)
|
|
132
139
|
```
|
|
133
140
|
|
|
141
|
+
|
|
142
|
+
|
|
134
143
|
### Parameters
|
|
135
144
|
|
|
136
145
|
Name | Type | Description | Notes
|
|
@@ -168,13 +177,16 @@ Get algorithm by ID.
|
|
|
168
177
|
|
|
169
178
|
### Example
|
|
170
179
|
|
|
171
|
-
* Api Key Authentication (
|
|
180
|
+
* Api Key Authentication (backend):
|
|
181
|
+
* Api Key Authentication (user):
|
|
172
182
|
```python
|
|
173
|
-
from __future__ import print_function
|
|
174
183
|
import time
|
|
184
|
+
import os
|
|
175
185
|
import compute_api_client
|
|
186
|
+
from compute_api_client.models.algorithm import Algorithm
|
|
176
187
|
from compute_api_client.rest import ApiException
|
|
177
188
|
from pprint import pprint
|
|
189
|
+
|
|
178
190
|
# Defining the host is optional and defaults to http://localhost
|
|
179
191
|
# See configuration.py for a list of all supported configuration parameters.
|
|
180
192
|
configuration = compute_api_client.Configuration(
|
|
@@ -186,75 +198,34 @@ configuration = compute_api_client.Configuration(
|
|
|
186
198
|
# Examples for each auth method are provided below, use the example that
|
|
187
199
|
# satisfies your auth use case.
|
|
188
200
|
|
|
189
|
-
# Configure API key authorization:
|
|
190
|
-
configuration.api_key['
|
|
201
|
+
# Configure API key authorization: backend
|
|
202
|
+
configuration.api_key['backend'] = os.environ["API_KEY"]
|
|
191
203
|
|
|
192
204
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
193
|
-
# configuration.api_key_prefix['
|
|
205
|
+
# configuration.api_key_prefix['backend'] = 'Bearer'
|
|
194
206
|
|
|
195
207
|
# Configure API key authorization: user
|
|
196
|
-
configuration.api_key['user'] =
|
|
208
|
+
configuration.api_key['user'] = os.environ["API_KEY"]
|
|
197
209
|
|
|
198
210
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
199
211
|
# configuration.api_key_prefix['user'] = 'Bearer'
|
|
200
212
|
|
|
201
213
|
# Enter a context with an instance of the API client
|
|
202
|
-
with compute_api_client.ApiClient(configuration) as api_client:
|
|
214
|
+
async with compute_api_client.ApiClient(configuration) as api_client:
|
|
203
215
|
# Create an instance of the API class
|
|
204
216
|
api_instance = compute_api_client.AlgorithmsApi(api_client)
|
|
205
217
|
id = 56 # int |
|
|
206
218
|
|
|
207
219
|
try:
|
|
208
220
|
# Retrieve algorithm
|
|
209
|
-
api_response = api_instance.read_algorithm_algorithms_id_get(id)
|
|
221
|
+
api_response = await api_instance.read_algorithm_algorithms_id_get(id)
|
|
222
|
+
print("The response of AlgorithmsApi->read_algorithm_algorithms_id_get:\n")
|
|
210
223
|
pprint(api_response)
|
|
211
|
-
except
|
|
224
|
+
except Exception as e:
|
|
212
225
|
print("Exception when calling AlgorithmsApi->read_algorithm_algorithms_id_get: %s\n" % e)
|
|
213
226
|
```
|
|
214
227
|
|
|
215
|
-
* Api Key Authentication (user):
|
|
216
|
-
```python
|
|
217
|
-
from __future__ import print_function
|
|
218
|
-
import time
|
|
219
|
-
import compute_api_client
|
|
220
|
-
from compute_api_client.rest import ApiException
|
|
221
|
-
from pprint import pprint
|
|
222
|
-
# Defining the host is optional and defaults to http://localhost
|
|
223
|
-
# See configuration.py for a list of all supported configuration parameters.
|
|
224
|
-
configuration = compute_api_client.Configuration(
|
|
225
|
-
host = "http://localhost"
|
|
226
|
-
)
|
|
227
|
-
|
|
228
|
-
# The client must configure the authentication and authorization parameters
|
|
229
|
-
# in accordance with the API server security policy.
|
|
230
|
-
# Examples for each auth method are provided below, use the example that
|
|
231
|
-
# satisfies your auth use case.
|
|
232
|
-
|
|
233
|
-
# Configure API key authorization: runtime
|
|
234
|
-
configuration.api_key['runtime'] = 'YOUR_API_KEY'
|
|
235
|
-
|
|
236
|
-
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
237
|
-
# configuration.api_key_prefix['runtime'] = 'Bearer'
|
|
238
|
-
|
|
239
|
-
# Configure API key authorization: user
|
|
240
|
-
configuration.api_key['user'] = 'YOUR_API_KEY'
|
|
241
228
|
|
|
242
|
-
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
243
|
-
# configuration.api_key_prefix['user'] = 'Bearer'
|
|
244
|
-
|
|
245
|
-
# Enter a context with an instance of the API client
|
|
246
|
-
with compute_api_client.ApiClient(configuration) as api_client:
|
|
247
|
-
# Create an instance of the API class
|
|
248
|
-
api_instance = compute_api_client.AlgorithmsApi(api_client)
|
|
249
|
-
id = 56 # int |
|
|
250
|
-
|
|
251
|
-
try:
|
|
252
|
-
# Retrieve algorithm
|
|
253
|
-
api_response = api_instance.read_algorithm_algorithms_id_get(id)
|
|
254
|
-
pprint(api_response)
|
|
255
|
-
except ApiException as e:
|
|
256
|
-
print("Exception when calling AlgorithmsApi->read_algorithm_algorithms_id_get: %s\n" % e)
|
|
257
|
-
```
|
|
258
229
|
|
|
259
230
|
### Parameters
|
|
260
231
|
|
|
@@ -268,7 +239,7 @@ Name | Type | Description | Notes
|
|
|
268
239
|
|
|
269
240
|
### Authorization
|
|
270
241
|
|
|
271
|
-
[
|
|
242
|
+
[backend](../README.md#backend), [user](../README.md#user)
|
|
272
243
|
|
|
273
244
|
### HTTP request headers
|
|
274
245
|
|
|
@@ -285,7 +256,7 @@ Name | Type | Description | Notes
|
|
|
285
256
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
286
257
|
|
|
287
258
|
# **read_algorithms_algorithms_get**
|
|
288
|
-
>
|
|
259
|
+
> List[Algorithm] read_algorithms_algorithms_get(latest=latest, id=id, project_id=project_id, type=type, shared=shared, link__isnull=link__isnull, link=link)
|
|
289
260
|
|
|
290
261
|
List algorithms
|
|
291
262
|
|
|
@@ -295,11 +266,15 @@ List algorithms.
|
|
|
295
266
|
|
|
296
267
|
* Api Key Authentication (user):
|
|
297
268
|
```python
|
|
298
|
-
from __future__ import print_function
|
|
299
269
|
import time
|
|
270
|
+
import os
|
|
300
271
|
import compute_api_client
|
|
272
|
+
from compute_api_client.models.algorithm import Algorithm
|
|
273
|
+
from compute_api_client.models.algorithm_type import AlgorithmType
|
|
274
|
+
from compute_api_client.models.share_type import ShareType
|
|
301
275
|
from compute_api_client.rest import ApiException
|
|
302
276
|
from pprint import pprint
|
|
277
|
+
|
|
303
278
|
# Defining the host is optional and defaults to http://localhost
|
|
304
279
|
# See configuration.py for a list of all supported configuration parameters.
|
|
305
280
|
configuration = compute_api_client.Configuration(
|
|
@@ -312,30 +287,49 @@ configuration = compute_api_client.Configuration(
|
|
|
312
287
|
# satisfies your auth use case.
|
|
313
288
|
|
|
314
289
|
# Configure API key authorization: user
|
|
315
|
-
configuration.api_key['user'] =
|
|
290
|
+
configuration.api_key['user'] = os.environ["API_KEY"]
|
|
316
291
|
|
|
317
292
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
318
293
|
# configuration.api_key_prefix['user'] = 'Bearer'
|
|
319
294
|
|
|
320
295
|
# Enter a context with an instance of the API client
|
|
321
|
-
with compute_api_client.ApiClient(configuration) as api_client:
|
|
296
|
+
async with compute_api_client.ApiClient(configuration) as api_client:
|
|
322
297
|
# Create an instance of the API class
|
|
323
298
|
api_instance = compute_api_client.AlgorithmsApi(api_client)
|
|
324
|
-
|
|
299
|
+
latest = True # bool | (optional)
|
|
300
|
+
id = 56 # int | (optional)
|
|
301
|
+
project_id = 56 # int | (optional)
|
|
302
|
+
type = compute_api_client.AlgorithmType() # AlgorithmType | (optional)
|
|
303
|
+
shared = compute_api_client.ShareType() # ShareType | (optional)
|
|
304
|
+
link__isnull = True # bool | (optional)
|
|
305
|
+
link = 'link_example' # str | (optional)
|
|
306
|
+
|
|
325
307
|
try:
|
|
326
308
|
# List algorithms
|
|
327
|
-
api_response = api_instance.read_algorithms_algorithms_get()
|
|
309
|
+
api_response = await api_instance.read_algorithms_algorithms_get(latest=latest, id=id, project_id=project_id, type=type, shared=shared, link__isnull=link__isnull, link=link)
|
|
310
|
+
print("The response of AlgorithmsApi->read_algorithms_algorithms_get:\n")
|
|
328
311
|
pprint(api_response)
|
|
329
|
-
except
|
|
312
|
+
except Exception as e:
|
|
330
313
|
print("Exception when calling AlgorithmsApi->read_algorithms_algorithms_get: %s\n" % e)
|
|
331
314
|
```
|
|
332
315
|
|
|
316
|
+
|
|
317
|
+
|
|
333
318
|
### Parameters
|
|
334
|
-
|
|
319
|
+
|
|
320
|
+
Name | Type | Description | Notes
|
|
321
|
+
------------- | ------------- | ------------- | -------------
|
|
322
|
+
**latest** | **bool**| | [optional]
|
|
323
|
+
**id** | **int**| | [optional]
|
|
324
|
+
**project_id** | **int**| | [optional]
|
|
325
|
+
**type** | [**AlgorithmType**](.md)| | [optional]
|
|
326
|
+
**shared** | [**ShareType**](.md)| | [optional]
|
|
327
|
+
**link__isnull** | **bool**| | [optional]
|
|
328
|
+
**link** | **str**| | [optional]
|
|
335
329
|
|
|
336
330
|
### Return type
|
|
337
331
|
|
|
338
|
-
[**
|
|
332
|
+
[**List[Algorithm]**](Algorithm.md)
|
|
339
333
|
|
|
340
334
|
### Authorization
|
|
341
335
|
|
|
@@ -350,6 +344,7 @@ This endpoint does not need any parameter.
|
|
|
350
344
|
| Status code | Description | Response headers |
|
|
351
345
|
|-------------|-------------|------------------|
|
|
352
346
|
**200** | Successful Response | - |
|
|
347
|
+
**422** | Validation Error | - |
|
|
353
348
|
|
|
354
349
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
355
350
|
|
|
@@ -364,11 +359,14 @@ Update an algorithm.
|
|
|
364
359
|
|
|
365
360
|
* Api Key Authentication (user):
|
|
366
361
|
```python
|
|
367
|
-
from __future__ import print_function
|
|
368
362
|
import time
|
|
363
|
+
import os
|
|
369
364
|
import compute_api_client
|
|
365
|
+
from compute_api_client.models.algorithm import Algorithm
|
|
366
|
+
from compute_api_client.models.algorithm_in import AlgorithmIn
|
|
370
367
|
from compute_api_client.rest import ApiException
|
|
371
368
|
from pprint import pprint
|
|
369
|
+
|
|
372
370
|
# Defining the host is optional and defaults to http://localhost
|
|
373
371
|
# See configuration.py for a list of all supported configuration parameters.
|
|
374
372
|
configuration = compute_api_client.Configuration(
|
|
@@ -381,26 +379,29 @@ configuration = compute_api_client.Configuration(
|
|
|
381
379
|
# satisfies your auth use case.
|
|
382
380
|
|
|
383
381
|
# Configure API key authorization: user
|
|
384
|
-
configuration.api_key['user'] =
|
|
382
|
+
configuration.api_key['user'] = os.environ["API_KEY"]
|
|
385
383
|
|
|
386
384
|
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
387
385
|
# configuration.api_key_prefix['user'] = 'Bearer'
|
|
388
386
|
|
|
389
387
|
# Enter a context with an instance of the API client
|
|
390
|
-
with compute_api_client.ApiClient(configuration) as api_client:
|
|
388
|
+
async with compute_api_client.ApiClient(configuration) as api_client:
|
|
391
389
|
# Create an instance of the API class
|
|
392
390
|
api_instance = compute_api_client.AlgorithmsApi(api_client)
|
|
393
391
|
id = 56 # int |
|
|
394
|
-
algorithm_in = compute_api_client.AlgorithmIn() # AlgorithmIn |
|
|
392
|
+
algorithm_in = compute_api_client.AlgorithmIn() # AlgorithmIn |
|
|
395
393
|
|
|
396
394
|
try:
|
|
397
395
|
# Update algorithm
|
|
398
|
-
api_response = api_instance.update_algorithm_algorithms_id_put(id, algorithm_in)
|
|
396
|
+
api_response = await api_instance.update_algorithm_algorithms_id_put(id, algorithm_in)
|
|
397
|
+
print("The response of AlgorithmsApi->update_algorithm_algorithms_id_put:\n")
|
|
399
398
|
pprint(api_response)
|
|
400
|
-
except
|
|
399
|
+
except Exception as e:
|
|
401
400
|
print("Exception when calling AlgorithmsApi->update_algorithm_algorithms_id_put: %s\n" % e)
|
|
402
401
|
```
|
|
403
402
|
|
|
403
|
+
|
|
404
|
+
|
|
404
405
|
### Parameters
|
|
405
406
|
|
|
406
407
|
Name | Type | Description | Notes
|