qi-compute-api-client 0.47.0__py3-none-any.whl → 0.49.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.

@@ -1975,8 +1975,9 @@ class BatchJobsApi:
1975
1975
 
1976
1976
 
1977
1977
  @validate_call
1978
- async def unpop_batch_job_batch_jobs_unpop_patch(
1978
+ async def unpop_batch_job_batch_jobs_id_unpop_patch(
1979
1979
  self,
1980
+ id: StrictInt,
1980
1981
  _request_timeout: Union[
1981
1982
  None,
1982
1983
  Annotated[StrictFloat, Field(gt=0)],
@@ -1994,6 +1995,8 @@ class BatchJobsApi:
1994
1995
 
1995
1996
  Unclaim batch job.
1996
1997
 
1998
+ :param id: (required)
1999
+ :type id: int
1997
2000
  :param _request_timeout: timeout setting for this request. If one
1998
2001
  number provided, it will be total request
1999
2002
  timeout. It can also be a pair (tuple) of
@@ -2016,7 +2019,8 @@ class BatchJobsApi:
2016
2019
  :return: Returns the result object.
2017
2020
  """ # noqa: E501
2018
2021
 
2019
- _param = self._unpop_batch_job_batch_jobs_unpop_patch_serialize(
2022
+ _param = self._unpop_batch_job_batch_jobs_id_unpop_patch_serialize(
2023
+ id=id,
2020
2024
  _request_auth=_request_auth,
2021
2025
  _content_type=_content_type,
2022
2026
  _headers=_headers,
@@ -2025,7 +2029,8 @@ class BatchJobsApi:
2025
2029
 
2026
2030
  _response_types_map: Dict[str, Optional[str]] = {
2027
2031
  '200': "BatchJob",
2028
- '404': "HTTPNotFoundError"
2032
+ '404': "HTTPNotFoundError",
2033
+ '422': "HTTPValidationError"
2029
2034
 
2030
2035
  }
2031
2036
  response_data = await self.api_client.call_api(
@@ -2040,8 +2045,9 @@ class BatchJobsApi:
2040
2045
 
2041
2046
 
2042
2047
  @validate_call
2043
- async def unpop_batch_job_batch_jobs_unpop_patch_with_http_info(
2048
+ async def unpop_batch_job_batch_jobs_id_unpop_patch_with_http_info(
2044
2049
  self,
2050
+ id: StrictInt,
2045
2051
  _request_timeout: Union[
2046
2052
  None,
2047
2053
  Annotated[StrictFloat, Field(gt=0)],
@@ -2059,6 +2065,8 @@ class BatchJobsApi:
2059
2065
 
2060
2066
  Unclaim batch job.
2061
2067
 
2068
+ :param id: (required)
2069
+ :type id: int
2062
2070
  :param _request_timeout: timeout setting for this request. If one
2063
2071
  number provided, it will be total request
2064
2072
  timeout. It can also be a pair (tuple) of
@@ -2081,7 +2089,8 @@ class BatchJobsApi:
2081
2089
  :return: Returns the result object.
2082
2090
  """ # noqa: E501
2083
2091
 
2084
- _param = self._unpop_batch_job_batch_jobs_unpop_patch_serialize(
2092
+ _param = self._unpop_batch_job_batch_jobs_id_unpop_patch_serialize(
2093
+ id=id,
2085
2094
  _request_auth=_request_auth,
2086
2095
  _content_type=_content_type,
2087
2096
  _headers=_headers,
@@ -2090,7 +2099,8 @@ class BatchJobsApi:
2090
2099
 
2091
2100
  _response_types_map: Dict[str, Optional[str]] = {
2092
2101
  '200': "BatchJob",
2093
- '404': "HTTPNotFoundError"
2102
+ '404': "HTTPNotFoundError",
2103
+ '422': "HTTPValidationError"
2094
2104
 
2095
2105
  }
2096
2106
  response_data = await self.api_client.call_api(
@@ -2105,8 +2115,9 @@ class BatchJobsApi:
2105
2115
 
2106
2116
 
2107
2117
  @validate_call
2108
- async def unpop_batch_job_batch_jobs_unpop_patch_without_preload_content(
2118
+ async def unpop_batch_job_batch_jobs_id_unpop_patch_without_preload_content(
2109
2119
  self,
2120
+ id: StrictInt,
2110
2121
  _request_timeout: Union[
2111
2122
  None,
2112
2123
  Annotated[StrictFloat, Field(gt=0)],
@@ -2124,6 +2135,8 @@ class BatchJobsApi:
2124
2135
 
2125
2136
  Unclaim batch job.
2126
2137
 
2138
+ :param id: (required)
2139
+ :type id: int
2127
2140
  :param _request_timeout: timeout setting for this request. If one
2128
2141
  number provided, it will be total request
2129
2142
  timeout. It can also be a pair (tuple) of
@@ -2146,7 +2159,8 @@ class BatchJobsApi:
2146
2159
  :return: Returns the result object.
2147
2160
  """ # noqa: E501
2148
2161
 
2149
- _param = self._unpop_batch_job_batch_jobs_unpop_patch_serialize(
2162
+ _param = self._unpop_batch_job_batch_jobs_id_unpop_patch_serialize(
2163
+ id=id,
2150
2164
  _request_auth=_request_auth,
2151
2165
  _content_type=_content_type,
2152
2166
  _headers=_headers,
@@ -2155,7 +2169,8 @@ class BatchJobsApi:
2155
2169
 
2156
2170
  _response_types_map: Dict[str, Optional[str]] = {
2157
2171
  '200': "BatchJob",
2158
- '404': "HTTPNotFoundError"
2172
+ '404': "HTTPNotFoundError",
2173
+ '422': "HTTPValidationError"
2159
2174
 
2160
2175
  }
2161
2176
  response_data = await self.api_client.call_api(
@@ -2165,8 +2180,9 @@ class BatchJobsApi:
2165
2180
  return response_data.response
2166
2181
 
2167
2182
 
2168
- def _unpop_batch_job_batch_jobs_unpop_patch_serialize(
2183
+ def _unpop_batch_job_batch_jobs_id_unpop_patch_serialize(
2169
2184
  self,
2185
+ id,
2170
2186
  _request_auth,
2171
2187
  _content_type,
2172
2188
  _headers,
@@ -2187,6 +2203,8 @@ class BatchJobsApi:
2187
2203
  _body_params: Optional[bytes] = None
2188
2204
 
2189
2205
  # process the path parameters
2206
+ if id is not None:
2207
+ _path_params['id'] = id
2190
2208
  # process the query parameters
2191
2209
  # process the header parameters
2192
2210
  # process the form parameters
@@ -2208,7 +2226,7 @@ class BatchJobsApi:
2208
2226
 
2209
2227
  return self.api_client.param_serialize(
2210
2228
  method='PATCH',
2211
- resource_path='/batch_jobs/unpop',
2229
+ resource_path='/batch_jobs/{id}/unpop',
2212
2230
  path_params=_path_params,
2213
2231
  query_params=_query_params,
2214
2232
  header_params=_header_params,
@@ -10,7 +10,7 @@ Method | HTTP request | Description
10
10
  [**peek_batch_job_batch_jobs_peek_patch**](BatchJobsApi.md#peek_batch_job_batch_jobs_peek_patch) | **PATCH** /batch_jobs/peek | Peek batch job
11
11
  [**pop_batch_job_batch_jobs_pop_patch**](BatchJobsApi.md#pop_batch_job_batch_jobs_pop_patch) | **PATCH** /batch_jobs/pop | Take batch job
12
12
  [**read_batch_jobs_batch_jobs_get**](BatchJobsApi.md#read_batch_jobs_batch_jobs_get) | **GET** /batch_jobs | List batch jobs
13
- [**unpop_batch_job_batch_jobs_unpop_patch**](BatchJobsApi.md#unpop_batch_job_batch_jobs_unpop_patch) | **PATCH** /batch_jobs/unpop | Take batch job
13
+ [**unpop_batch_job_batch_jobs_id_unpop_patch**](BatchJobsApi.md#unpop_batch_job_batch_jobs_id_unpop_patch) | **PATCH** /batch_jobs/{id}/unpop | Take batch job
14
14
 
15
15
 
16
16
  # **create_batch_job_batch_jobs_post**
@@ -511,8 +511,8 @@ Name | Type | Description | Notes
511
511
 
512
512
  [[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)
513
513
 
514
- # **unpop_batch_job_batch_jobs_unpop_patch**
515
- > BatchJob unpop_batch_job_batch_jobs_unpop_patch()
514
+ # **unpop_batch_job_batch_jobs_id_unpop_patch**
515
+ > BatchJob unpop_batch_job_batch_jobs_id_unpop_patch(id)
516
516
 
517
517
  Take batch job
518
518
 
@@ -550,20 +550,24 @@ configuration.api_key['backend'] = os.environ["API_KEY"]
550
550
  async with compute_api_client.ApiClient(configuration) as api_client:
551
551
  # Create an instance of the API class
552
552
  api_instance = compute_api_client.BatchJobsApi(api_client)
553
+ id = 56 # int |
553
554
 
554
555
  try:
555
556
  # Take batch job
556
- api_response = await api_instance.unpop_batch_job_batch_jobs_unpop_patch()
557
- print("The response of BatchJobsApi->unpop_batch_job_batch_jobs_unpop_patch:\n")
557
+ api_response = await api_instance.unpop_batch_job_batch_jobs_id_unpop_patch(id)
558
+ print("The response of BatchJobsApi->unpop_batch_job_batch_jobs_id_unpop_patch:\n")
558
559
  pprint(api_response)
559
560
  except Exception as e:
560
- print("Exception when calling BatchJobsApi->unpop_batch_job_batch_jobs_unpop_patch: %s\n" % e)
561
+ print("Exception when calling BatchJobsApi->unpop_batch_job_batch_jobs_id_unpop_patch: %s\n" % e)
561
562
  ```
562
563
 
563
564
 
564
565
 
565
566
  ### Parameters
566
- This endpoint does not need any parameter.
567
+
568
+ Name | Type | Description | Notes
569
+ ------------- | ------------- | ------------- | -------------
570
+ **id** | **int**| |
567
571
 
568
572
  ### Return type
569
573
 
@@ -583,6 +587,7 @@ This endpoint does not need any parameter.
583
587
  |-------------|-------------|------------------|
584
588
  **200** | Successful Response | - |
585
589
  **404** | Not Found | - |
590
+ **422** | Validation Error | - |
586
591
 
587
592
  [[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)
588
593
 
qi2_shared/utils.py ADDED
@@ -0,0 +1,13 @@
1
+ import asyncio
2
+ import concurrent
3
+ from typing import Any, Coroutine
4
+
5
+
6
+ def run_async(async_function: Coroutine[Any, Any, Any]) -> Any:
7
+ try:
8
+ _ = asyncio.get_running_loop()
9
+ except RuntimeError:
10
+ return asyncio.run(async_function)
11
+
12
+ with concurrent.futures.ThreadPoolExecutor() as executor:
13
+ return executor.submit(asyncio.run, async_function).result()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: qi-compute-api-client
3
- Version: 0.47.0
3
+ Version: 0.49.0
4
4
  Summary: An API client for the Compute Job Manager of Quantum Inspire.
5
5
  License: Apache-2.0
6
6
  Author: Quantum Inspire
@@ -115,7 +115,7 @@ All URIs are relative to _http://localhost_
115
115
  | _BatchJobsApi_ | [**peek_batch_job_batch_jobs_peek_patch**](compute_api_client/docs/BatchJobsApi.md#peek_batch_job_batch_jobs_peek_patch) | **PATCH** /batch_jobs/peek | Peek batch job |
116
116
  | _BatchJobsApi_ | [**pop_batch_job_batch_jobs_pop_patch**](compute_api_client/docs/BatchJobsApi.md#pop_batch_job_batch_jobs_pop_patch) | **PATCH** /batch_jobs/pop | Take batch job |
117
117
  | _BatchJobsApi_ | [**read_batch_jobs_batch_jobs_get**](compute_api_client/docs/BatchJobsApi.md#read_batch_jobs_batch_jobs_get) | **GET** /batch_jobs | List batch jobs |
118
- | _BatchJobsApi_ | [**unpop_batch_job_batch_jobs_unpop_patch**](compute_api_client/docs/BatchJobsApi.md#unpop_batch_job_batch_jobs_unpop_patch) | **PATCH** /batch_jobs/unpop | Take batch job |
118
+ | _BatchJobsApi_ | [**unpop_batch_job_batch_jobs_id_unpop_patch**](compute_api_client/docs/BatchJobsApi.md#unpop_batch_job_batch_jobs_id_unpop_patch) | **PATCH** /batch_jobs/{id}/unpop | Take batch job |
119
119
  | _CommitsApi_ | [**compile_commit_commits_id_compile_post**](compute_api_client/docs/CommitsApi.md#compile_commit_commits_id_compile_post) | **POST** /commits/{id}/compile | Compile file in a commit |
120
120
  | _CommitsApi_ | [**create_commit_commits_post**](compute_api_client/docs/CommitsApi.md#create_commit_commits_post) | **POST** /commits | Create commit |
121
121
  | _CommitsApi_ | [**delete_commit_commits_id_delete**](compute_api_client/docs/CommitsApi.md#delete_commit_commits_id_delete) | **DELETE** /commits/{id} | Destroy commit |
@@ -4,7 +4,7 @@ compute_api_client/api/algorithms_api.py,sha256=Iq3X7347R8ZsF3hDoIlEA8girl0ww_k1
4
4
  compute_api_client/api/auth_config_api.py,sha256=O7XDoKk6-bWyUJkfiiOZRbb8OuDv_H0xvcs_XFfAGG8,10356
5
5
  compute_api_client/api/backend_api.py,sha256=zNX_CYAm-6IrCuR7hlgHOCTwOkR1YQXn-3Ck9VUsCK8,57958
6
6
  compute_api_client/api/backend_types_api.py,sha256=NL8pscTuqUfTKoqC_HJ55clfpBgXQ6ZdFZjYEowlRuE,30753
7
- compute_api_client/api/batch_jobs_api.py,sha256=OB9EsaNpLvr80Tq3CUkNoJlwrO4CnDnVBeHne3FVJa8,83892
7
+ compute_api_client/api/batch_jobs_api.py,sha256=V-HYrI6Lnrc6E7BhHNUwolZRLhLdTnSMZk3C9psQML8,84401
8
8
  compute_api_client/api/commits_api.py,sha256=ETcosKPwE8EYr_wd3rZItlmJqLtuSu8E2CpJt0t5y_0,57560
9
9
  compute_api_client/api/files_api.py,sha256=eItVegQVnni7AK2yyT_6Paj4WB01vUwM8fIwxwJEZuk,47862
10
10
  compute_api_client/api/final_results_api.py,sha256=zfr4Yn44Q5KhNSHAk2aC_ZfLa1yASHHq3D3_MJ3ToNg,31894
@@ -40,7 +40,7 @@ compute_api_client/docs/BackendWithAuthentication.md,sha256=u9lZh4FusMtOuV53yc0Q
40
40
  compute_api_client/docs/BatchJob.md,sha256=IozaJI2zAL1zo_zmuI-RIKvLGK68KkyW53AH4jbIaIs,1210
41
41
  compute_api_client/docs/BatchJobIn.md,sha256=9-nP1Xgnzd5tfvo8WmandUWR8IY-2pMeZyW0HveKZEU,847
42
42
  compute_api_client/docs/BatchJobStatus.md,sha256=UQift_l9A3L0azzYjQtr7UnmYk6X36Ug3U7S-VTpx7A,293
43
- compute_api_client/docs/BatchJobsApi.md,sha256=h7MhwjOcDwfSuDOK44XrwYw30oUN4vOw4LrM12L2JtI,20832
43
+ compute_api_client/docs/BatchJobsApi.md,sha256=TBH2e3AzznQ6tFNryR7Gz6o2ycmaNB17BYDpQ7A0DnE,20996
44
44
  compute_api_client/docs/Commit.md,sha256=WI3TcSFBdLWRjvJ9OBKiAKSN5AX7gXHs7EZm-Zs77FE,894
45
45
  compute_api_client/docs/CommitIn.md,sha256=tnd4OQ1brIRnNGAGkH3x_HRIQIg68CZTuAEJ2JDKK9w,843
46
46
  compute_api_client/docs/CommitsApi.md,sha256=FcRxDjqBQqI_1tqDBkF-cB06euahEhWl_choBd4aRCE,13786
@@ -191,7 +191,8 @@ qi2_shared/hybrid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
191
191
  qi2_shared/hybrid/quantum_interface.py,sha256=3_XynjDHwt96fOqYKjuv30I5QU8DE2vU03pT0jVAqOg,1447
192
192
  qi2_shared/pagination.py,sha256=sypb9tSsi_7A1D9WoaUEuo7Xyfci8gG2QCX8XSIb7rI,1844
193
193
  qi2_shared/settings.py,sha256=x2wNv8nzftMFb-5K7wKvhfJVxQn0YYlZ_Guu6DHm_qU,2384
194
- qi_compute_api_client-0.47.0.dist-info/LICENSE.md,sha256=aNrwtY65Glxv8qK2ZkJ_V4zq7SyY8CfLa-vo9wBpTQY,10723
195
- qi_compute_api_client-0.47.0.dist-info/METADATA,sha256=6dDBgmSeXRtyWjsDdrmnzcSvH2Xq0K_SjS33MuWA_5k,29265
196
- qi_compute_api_client-0.47.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
197
- qi_compute_api_client-0.47.0.dist-info/RECORD,,
194
+ qi2_shared/utils.py,sha256=uD7Unuhoze3DWcz6NKvAmSMkiVO1vrlhO-zZEy1-89g,381
195
+ qi_compute_api_client-0.49.0.dist-info/LICENSE.md,sha256=aNrwtY65Glxv8qK2ZkJ_V4zq7SyY8CfLa-vo9wBpTQY,10723
196
+ qi_compute_api_client-0.49.0.dist-info/METADATA,sha256=puUN9NLuIZG2P-JotDjxVKn9snCzJESB5IQNJCHtFUw,29265
197
+ qi_compute_api_client-0.49.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
198
+ qi_compute_api_client-0.49.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.0.1
2
+ Generator: poetry-core 2.1.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any