qcs_api_client 0.27.3__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.
Files changed (172) hide show
  1. qcs_api_client/__init__.py +1 -0
  2. qcs_api_client/api/__init__.py +1 -0
  3. qcs_api_client/api/account/__init__.py +1 -0
  4. qcs_api_client/api/account/activate_user.py +155 -0
  5. qcs_api_client/api/account/add_group_user.py +156 -0
  6. qcs_api_client/api/account/dismiss_viewer_announcement.py +145 -0
  7. qcs_api_client/api/account/get_group_balance.py +149 -0
  8. qcs_api_client/api/account/get_group_billing_customer.py +145 -0
  9. qcs_api_client/api/account/get_group_upcoming_billing_invoice.py +145 -0
  10. qcs_api_client/api/account/get_user_balance.py +149 -0
  11. qcs_api_client/api/account/get_user_billing_customer.py +145 -0
  12. qcs_api_client/api/account/get_user_event_billing_price.py +170 -0
  13. qcs_api_client/api/account/get_user_upcoming_billing_invoice.py +145 -0
  14. qcs_api_client/api/account/get_viewer_user_onboarding_completed.py +124 -0
  15. qcs_api_client/api/account/list_group_billing_invoice_lines.py +189 -0
  16. qcs_api_client/api/account/list_group_billing_invoices.py +177 -0
  17. qcs_api_client/api/account/list_group_upcoming_billing_invoice_lines.py +177 -0
  18. qcs_api_client/api/account/list_group_users.py +185 -0
  19. qcs_api_client/api/account/list_user_billing_invoice_lines.py +189 -0
  20. qcs_api_client/api/account/list_user_billing_invoices.py +177 -0
  21. qcs_api_client/api/account/list_user_groups.py +181 -0
  22. qcs_api_client/api/account/list_user_upcoming_billing_invoice_lines.py +177 -0
  23. qcs_api_client/api/account/list_viewer_announcements.py +178 -0
  24. qcs_api_client/api/account/put_viewer_user_onboarding_completed.py +150 -0
  25. qcs_api_client/api/account/remove_group_user.py +158 -0
  26. qcs_api_client/api/account/update_viewer_user_profile.py +150 -0
  27. qcs_api_client/api/authentication/__init__.py +1 -0
  28. qcs_api_client/api/authentication/auth_email_password_reset_token.py +153 -0
  29. qcs_api_client/api/authentication/auth_get_user.py +128 -0
  30. qcs_api_client/api/authentication/auth_reset_password.py +152 -0
  31. qcs_api_client/api/authentication/auth_reset_password_with_token.py +154 -0
  32. qcs_api_client/api/client_applications/__init__.py +1 -0
  33. qcs_api_client/api/client_applications/check_client_application.py +154 -0
  34. qcs_api_client/api/client_applications/get_client_application.py +151 -0
  35. qcs_api_client/api/client_applications/list_client_applications.py +129 -0
  36. qcs_api_client/api/default/__init__.py +1 -0
  37. qcs_api_client/api/default/get_health.py +123 -0
  38. qcs_api_client/api/default/health_check.py +124 -0
  39. qcs_api_client/api/default/health_check_deprecated.py +126 -0
  40. qcs_api_client/api/endpoints/__init__.py +1 -0
  41. qcs_api_client/api/endpoints/create_endpoint.py +157 -0
  42. qcs_api_client/api/endpoints/delete_endpoint.py +148 -0
  43. qcs_api_client/api/endpoints/get_default_endpoint.py +154 -0
  44. qcs_api_client/api/endpoints/get_endpoint.py +150 -0
  45. qcs_api_client/api/endpoints/list_endpoints.py +182 -0
  46. qcs_api_client/api/endpoints/restart_endpoint.py +168 -0
  47. qcs_api_client/api/engagements/__init__.py +1 -0
  48. qcs_api_client/api/engagements/create_engagement.py +196 -0
  49. qcs_api_client/api/quantum_processors/__init__.py +1 -0
  50. qcs_api_client/api/quantum_processors/get_instruction_set_architecture.py +144 -0
  51. qcs_api_client/api/quantum_processors/get_quantum_processor.py +148 -0
  52. qcs_api_client/api/quantum_processors/get_quantum_processor_accessors.py +150 -0
  53. qcs_api_client/api/quantum_processors/list_instruction_set_architectures.py +164 -0
  54. qcs_api_client/api/quantum_processors/list_quantum_processors.py +170 -0
  55. qcs_api_client/api/reservations/__init__.py +1 -0
  56. qcs_api_client/api/reservations/create_reservation.py +200 -0
  57. qcs_api_client/api/reservations/delete_reservation.py +149 -0
  58. qcs_api_client/api/reservations/find_available_reservations.py +211 -0
  59. qcs_api_client/api/reservations/get_quantum_processor_calendar.py +149 -0
  60. qcs_api_client/api/reservations/get_reservation.py +149 -0
  61. qcs_api_client/api/reservations/list_group_reservations.py +309 -0
  62. qcs_api_client/api/reservations/list_reservations.py +335 -0
  63. qcs_api_client/client/__init__.py +12 -0
  64. qcs_api_client/client/auth.py +78 -0
  65. qcs_api_client/client/client.py +48 -0
  66. qcs_api_client/errors.py +16 -0
  67. qcs_api_client/models/__init__.py +185 -0
  68. qcs_api_client/models/account_balance.py +72 -0
  69. qcs_api_client/models/account_type.py +9 -0
  70. qcs_api_client/models/activate_user_request.py +93 -0
  71. qcs_api_client/models/add_group_user_request.py +95 -0
  72. qcs_api_client/models/announcement.py +97 -0
  73. qcs_api_client/models/announcements_response.py +93 -0
  74. qcs_api_client/models/architecture.py +134 -0
  75. qcs_api_client/models/auth_email_password_reset_token_request.py +69 -0
  76. qcs_api_client/models/auth_reset_password_request.py +77 -0
  77. qcs_api_client/models/auth_reset_password_with_token_request.py +78 -0
  78. qcs_api_client/models/available_reservation.py +104 -0
  79. qcs_api_client/models/billing_customer.py +78 -0
  80. qcs_api_client/models/billing_invoice.py +130 -0
  81. qcs_api_client/models/billing_invoice_line.py +165 -0
  82. qcs_api_client/models/billing_invoice_line_line_item_type.py +9 -0
  83. qcs_api_client/models/billing_invoice_line_metadata.py +55 -0
  84. qcs_api_client/models/billing_invoice_status.py +12 -0
  85. qcs_api_client/models/billing_price.py +234 -0
  86. qcs_api_client/models/billing_price_object.py +8 -0
  87. qcs_api_client/models/billing_price_price_type.py +9 -0
  88. qcs_api_client/models/billing_price_recurrence.py +124 -0
  89. qcs_api_client/models/billing_price_recurrence_aggregate_usage.py +11 -0
  90. qcs_api_client/models/billing_price_recurrence_interval.py +11 -0
  91. qcs_api_client/models/billing_price_recurrence_usage_type.py +9 -0
  92. qcs_api_client/models/billing_price_scheme.py +9 -0
  93. qcs_api_client/models/billing_price_tiers_mode.py +9 -0
  94. qcs_api_client/models/billing_product.py +109 -0
  95. qcs_api_client/models/billing_product_object.py +8 -0
  96. qcs_api_client/models/billing_upcoming_invoice.py +122 -0
  97. qcs_api_client/models/characteristic.py +125 -0
  98. qcs_api_client/models/check_client_application_request.py +77 -0
  99. qcs_api_client/models/check_client_application_response.py +85 -0
  100. qcs_api_client/models/checksum_description.py +78 -0
  101. qcs_api_client/models/checksum_description_type.py +8 -0
  102. qcs_api_client/models/client_application.py +130 -0
  103. qcs_api_client/models/client_applications_download_link.py +100 -0
  104. qcs_api_client/models/code.py +17 -0
  105. qcs_api_client/models/create_endpoint_parameters.py +93 -0
  106. qcs_api_client/models/create_engagement_request.py +116 -0
  107. qcs_api_client/models/create_reservation_request.py +124 -0
  108. qcs_api_client/models/dictionary.py +55 -0
  109. qcs_api_client/models/edge.py +78 -0
  110. qcs_api_client/models/endpoint.py +140 -0
  111. qcs_api_client/models/endpoint_addresses.py +77 -0
  112. qcs_api_client/models/engagement_credentials.py +87 -0
  113. qcs_api_client/models/engagement_with_credentials.py +169 -0
  114. qcs_api_client/models/error.py +112 -0
  115. qcs_api_client/models/event_billing_price_rate.py +107 -0
  116. qcs_api_client/models/family.py +11 -0
  117. qcs_api_client/models/find_available_reservations_response.py +92 -0
  118. qcs_api_client/models/get_account_event_billing_price_request.py +81 -0
  119. qcs_api_client/models/group.py +112 -0
  120. qcs_api_client/models/health.py +69 -0
  121. qcs_api_client/models/instruction_set_architecture.py +142 -0
  122. qcs_api_client/models/invite_user_request.py +87 -0
  123. qcs_api_client/models/list_account_billing_invoice_lines_response.py +92 -0
  124. qcs_api_client/models/list_account_billing_invoices_response.py +92 -0
  125. qcs_api_client/models/list_client_applications_response.py +83 -0
  126. qcs_api_client/models/list_endpoints_response.py +93 -0
  127. qcs_api_client/models/list_group_reservations_show_deleted.py +9 -0
  128. qcs_api_client/models/list_group_users_response.py +92 -0
  129. qcs_api_client/models/list_groups_response.py +92 -0
  130. qcs_api_client/models/list_instruction_set_architecture_response.py +94 -0
  131. qcs_api_client/models/list_quantum_processor_accessors_response.py +92 -0
  132. qcs_api_client/models/list_quantum_processors_response.py +92 -0
  133. qcs_api_client/models/list_reservations_response.py +91 -0
  134. qcs_api_client/models/list_reservations_show_deleted.py +9 -0
  135. qcs_api_client/models/node.py +76 -0
  136. qcs_api_client/models/nomad_job_datacenters.py +10 -0
  137. qcs_api_client/models/operation.py +138 -0
  138. qcs_api_client/models/operation_site.py +93 -0
  139. qcs_api_client/models/parameter.py +70 -0
  140. qcs_api_client/models/product.py +10 -0
  141. qcs_api_client/models/quantum_processor.py +70 -0
  142. qcs_api_client/models/quantum_processor_accessor.py +112 -0
  143. qcs_api_client/models/quantum_processor_accessor_type.py +9 -0
  144. qcs_api_client/models/quantum_processor_calendar.py +69 -0
  145. qcs_api_client/models/remove_group_user_request.py +95 -0
  146. qcs_api_client/models/reservation.py +218 -0
  147. qcs_api_client/models/restart_endpoint_request.py +67 -0
  148. qcs_api_client/models/tier.py +113 -0
  149. qcs_api_client/models/update_viewer_user_profile_request.py +85 -0
  150. qcs_api_client/models/user.py +110 -0
  151. qcs_api_client/models/user_credentials.py +75 -0
  152. qcs_api_client/models/user_credentials_password.py +69 -0
  153. qcs_api_client/models/user_profile.py +93 -0
  154. qcs_api_client/models/validation_error.py +89 -0
  155. qcs_api_client/models/validation_error_in.py +11 -0
  156. qcs_api_client/models/validation_location.py +11 -0
  157. qcs_api_client/models/viewer_user_onboarding_completed.py +69 -0
  158. qcs_api_client/operations/__init__.py +8 -0
  159. qcs_api_client/operations/asyncio/__init__.py +121 -0
  160. qcs_api_client/operations/asyncio_from_dict/__init__.py +139 -0
  161. qcs_api_client/operations/sync/__init__.py +117 -0
  162. qcs_api_client/operations/sync_from_dict/__init__.py +133 -0
  163. qcs_api_client/py.typed +1 -0
  164. qcs_api_client/types.py +74 -0
  165. qcs_api_client/util/__init__.py +0 -0
  166. qcs_api_client/util/errors.py +32 -0
  167. qcs_api_client/util/retry.py +26 -0
  168. qcs_api_client/util/serialization.py +5 -0
  169. qcs_api_client-0.27.3.dist-info/METADATA +101 -0
  170. qcs_api_client-0.27.3.dist-info/RECORD +172 -0
  171. qcs_api_client-0.27.3.dist-info/WHEEL +4 -0
  172. qcs_api_client-0.27.3.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,154 @@
1
+ from typing import Any, cast
2
+
3
+ import httpx
4
+ from tenacity import retry
5
+
6
+ from ...models.auth_reset_password_with_token_request import AuthResetPasswordWithTokenRequest
7
+ from ...models.error import Error
8
+ from ...types import Response
9
+ from ...util.errors import QCSHTTPStatusError
10
+ from ...util.retry import DEFAULT_RETRY_ARGUMENTS
11
+
12
+
13
+ def _get_kwargs(
14
+ *,
15
+ body: AuthResetPasswordWithTokenRequest,
16
+ ) -> dict[str, Any]:
17
+ headers: dict[str, Any] = {}
18
+
19
+ _kwargs: dict[str, Any] = {
20
+ "method": "post",
21
+ "url": "/v1/auth:resetPasswordWithToken",
22
+ }
23
+
24
+ _kwargs["json"] = body.to_dict()
25
+
26
+ headers["Content-Type"] = "application/json"
27
+
28
+ _kwargs["headers"] = headers
29
+ return _kwargs
30
+
31
+
32
+ def _parse_response(*, response: httpx.Response) -> Any | Error | None:
33
+ if response.status_code == 204:
34
+ response_204 = cast(Any, None)
35
+ return response_204
36
+
37
+ raise QCSHTTPStatusError(
38
+ message=f"Unexpected response: status code {response.status_code}",
39
+ response=response,
40
+ )
41
+
42
+
43
+ def _build_response(*, response: httpx.Response) -> Response[Any | Error]:
44
+ """Construct the Response class from the raw ``httpx.Response``."""
45
+ return Response.build_from_httpx_response(response=response, parse_function=_parse_response)
46
+
47
+
48
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
49
+ def sync(
50
+ *,
51
+ client: httpx.Client,
52
+ body: AuthResetPasswordWithTokenRequest,
53
+ httpx_request_kwargs: dict[str, Any] | None = None,
54
+ ) -> Response[Any | Error]:
55
+ """Reset Password With Token
56
+
57
+ Complete the forgot password flow, resetting the new password in exchange for an emailed token.
58
+
59
+ Args:
60
+ body (AuthResetPasswordWithTokenRequest): Token may be requested with
61
+ AuthEmailPasswordResetToken.
62
+
63
+ Raises:
64
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
65
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
66
+
67
+ Returns:
68
+ Response[Any | Error]
69
+ """
70
+
71
+ httpx_request_kwargs = httpx_request_kwargs or {}
72
+
73
+ kwargs = _get_kwargs(
74
+ body=body,
75
+ )
76
+ kwargs.update(httpx_request_kwargs)
77
+ response = client.request(
78
+ **kwargs,
79
+ )
80
+
81
+ return _build_response(response=response)
82
+
83
+
84
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
85
+ def sync_from_dict(
86
+ *,
87
+ client: httpx.Client,
88
+ body: dict,
89
+ httpx_request_kwargs: dict[str, Any] | None = None,
90
+ ) -> Response[Any | Error]:
91
+ httpx_request_kwargs = httpx_request_kwargs or {}
92
+
93
+ kwargs = _get_kwargs(
94
+ client=client,
95
+ body=body,
96
+ )
97
+ kwargs.update(httpx_request_kwargs)
98
+ response = client.request(
99
+ **kwargs,
100
+ )
101
+ return _build_response(response=response)
102
+
103
+
104
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
105
+ async def asyncio(
106
+ *,
107
+ client: httpx.AsyncClient,
108
+ body: AuthResetPasswordWithTokenRequest,
109
+ httpx_request_kwargs: dict[str, Any] | None = None,
110
+ ) -> Response[Any | Error]:
111
+ """Reset Password With Token
112
+
113
+ Complete the forgot password flow, resetting the new password in exchange for an emailed token.
114
+
115
+ Args:
116
+ body (AuthResetPasswordWithTokenRequest): Token may be requested with
117
+ AuthEmailPasswordResetToken.
118
+
119
+ Raises:
120
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
121
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
122
+
123
+ Returns:
124
+ Response[Any | Error]
125
+ """
126
+
127
+ httpx_request_kwargs = httpx_request_kwargs or {}
128
+ kwargs = _get_kwargs(
129
+ body=body,
130
+ )
131
+ kwargs.update(httpx_request_kwargs)
132
+ response = await client.request(**kwargs)
133
+ return _build_response(response=response)
134
+
135
+
136
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
137
+ async def asyncio_from_dict(
138
+ *,
139
+ client: httpx.AsyncClient,
140
+ body: dict,
141
+ httpx_request_kwargs: dict[str, Any] | None = None,
142
+ ) -> Response[Any | Error]:
143
+ httpx_request_kwargs = httpx_request_kwargs or {}
144
+
145
+ kwargs = _get_kwargs(
146
+ client=client,
147
+ body=body,
148
+ )
149
+ kwargs.update(httpx_request_kwargs)
150
+ response = await client.request(
151
+ **kwargs,
152
+ )
153
+
154
+ return _build_response(response=response)
@@ -0,0 +1 @@
1
+ """Contains endpoint functions for accessing the API"""
@@ -0,0 +1,154 @@
1
+ from typing import Any
2
+
3
+ import httpx
4
+ from tenacity import retry
5
+
6
+ from ...models.check_client_application_request import CheckClientApplicationRequest
7
+ from ...models.check_client_application_response import CheckClientApplicationResponse
8
+ from ...models.error import Error
9
+ from ...types import Response
10
+ from ...util.errors import QCSHTTPStatusError
11
+ from ...util.retry import DEFAULT_RETRY_ARGUMENTS
12
+
13
+
14
+ def _get_kwargs(
15
+ *,
16
+ body: CheckClientApplicationRequest,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+
20
+ _kwargs: dict[str, Any] = {
21
+ "method": "post",
22
+ "url": "/v1/clientApplications:check",
23
+ }
24
+
25
+ _kwargs["json"] = body.to_dict()
26
+
27
+ headers["Content-Type"] = "application/json"
28
+
29
+ _kwargs["headers"] = headers
30
+ return _kwargs
31
+
32
+
33
+ def _parse_response(*, response: httpx.Response) -> CheckClientApplicationResponse | Error | None:
34
+ if response.status_code == 200:
35
+ response_200 = CheckClientApplicationResponse.from_dict(response.json())
36
+
37
+ return response_200
38
+
39
+ raise QCSHTTPStatusError(
40
+ message=f"Unexpected response: status code {response.status_code}",
41
+ response=response,
42
+ )
43
+
44
+
45
+ def _build_response(*, response: httpx.Response) -> Response[CheckClientApplicationResponse | Error]:
46
+ """Construct the Response class from the raw ``httpx.Response``."""
47
+ return Response.build_from_httpx_response(response=response, parse_function=_parse_response)
48
+
49
+
50
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
51
+ def sync(
52
+ *,
53
+ client: httpx.Client,
54
+ body: CheckClientApplicationRequest,
55
+ httpx_request_kwargs: dict[str, Any] | None = None,
56
+ ) -> Response[CheckClientApplicationResponse | Error]:
57
+ """Check Client Application
58
+
59
+ Check the requested client application version against the latest and minimum version.
60
+
61
+ Args:
62
+ body (CheckClientApplicationRequest):
63
+
64
+ Raises:
65
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
66
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
67
+
68
+ Returns:
69
+ Response[CheckClientApplicationResponse | Error]
70
+ """
71
+
72
+ httpx_request_kwargs = httpx_request_kwargs or {}
73
+
74
+ kwargs = _get_kwargs(
75
+ body=body,
76
+ )
77
+ kwargs.update(httpx_request_kwargs)
78
+ response = client.request(
79
+ **kwargs,
80
+ )
81
+
82
+ return _build_response(response=response)
83
+
84
+
85
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
86
+ def sync_from_dict(
87
+ *,
88
+ client: httpx.Client,
89
+ body: dict,
90
+ httpx_request_kwargs: dict[str, Any] | None = None,
91
+ ) -> Response[CheckClientApplicationResponse | Error]:
92
+ httpx_request_kwargs = httpx_request_kwargs or {}
93
+
94
+ kwargs = _get_kwargs(
95
+ client=client,
96
+ body=body,
97
+ )
98
+ kwargs.update(httpx_request_kwargs)
99
+ response = client.request(
100
+ **kwargs,
101
+ )
102
+ return _build_response(response=response)
103
+
104
+
105
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
106
+ async def asyncio(
107
+ *,
108
+ client: httpx.AsyncClient,
109
+ body: CheckClientApplicationRequest,
110
+ httpx_request_kwargs: dict[str, Any] | None = None,
111
+ ) -> Response[CheckClientApplicationResponse | Error]:
112
+ """Check Client Application
113
+
114
+ Check the requested client application version against the latest and minimum version.
115
+
116
+ Args:
117
+ body (CheckClientApplicationRequest):
118
+
119
+ Raises:
120
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
121
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
122
+
123
+ Returns:
124
+ Response[CheckClientApplicationResponse | Error]
125
+ """
126
+
127
+ httpx_request_kwargs = httpx_request_kwargs or {}
128
+ kwargs = _get_kwargs(
129
+ body=body,
130
+ )
131
+ kwargs.update(httpx_request_kwargs)
132
+ response = await client.request(**kwargs)
133
+ return _build_response(response=response)
134
+
135
+
136
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
137
+ async def asyncio_from_dict(
138
+ *,
139
+ client: httpx.AsyncClient,
140
+ body: dict,
141
+ httpx_request_kwargs: dict[str, Any] | None = None,
142
+ ) -> Response[CheckClientApplicationResponse | Error]:
143
+ httpx_request_kwargs = httpx_request_kwargs or {}
144
+
145
+ kwargs = _get_kwargs(
146
+ client=client,
147
+ body=body,
148
+ )
149
+ kwargs.update(httpx_request_kwargs)
150
+ response = await client.request(
151
+ **kwargs,
152
+ )
153
+
154
+ return _build_response(response=response)
@@ -0,0 +1,151 @@
1
+ from typing import Any
2
+ from urllib.parse import quote
3
+
4
+ import httpx
5
+ from tenacity import retry
6
+
7
+ from ...models.client_application import ClientApplication
8
+ from ...models.error import Error
9
+ from ...types import Response
10
+ from ...util.errors import QCSHTTPStatusError
11
+ from ...util.retry import DEFAULT_RETRY_ARGUMENTS
12
+
13
+
14
+ def _get_kwargs(
15
+ client_application_name: str,
16
+ ) -> dict[str, Any]:
17
+
18
+ _kwargs: dict[str, Any] = {
19
+ "method": "get",
20
+ "url": "/v1/clientApplications/{client_application_name}".format(
21
+ client_application_name=quote(str(client_application_name), safe=""),
22
+ ),
23
+ }
24
+
25
+ return _kwargs
26
+
27
+
28
+ def _parse_response(*, response: httpx.Response) -> ClientApplication | Error | None:
29
+ if response.status_code == 200:
30
+ response_200 = ClientApplication.from_dict(response.json())
31
+
32
+ return response_200
33
+
34
+ raise QCSHTTPStatusError(
35
+ message=f"Unexpected response: status code {response.status_code}",
36
+ response=response,
37
+ )
38
+
39
+
40
+ def _build_response(*, response: httpx.Response) -> Response[ClientApplication | Error]:
41
+ """Construct the Response class from the raw ``httpx.Response``."""
42
+ return Response.build_from_httpx_response(response=response, parse_function=_parse_response)
43
+
44
+
45
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
46
+ def sync(
47
+ client_application_name: str,
48
+ *,
49
+ client: httpx.Client,
50
+ httpx_request_kwargs: dict[str, Any] | None = None,
51
+ ) -> Response[ClientApplication | Error]:
52
+ """Get Client Application
53
+
54
+ Get details of a specific Rigetti system component along with its latest and minimum supported
55
+ versions.
56
+
57
+ Args:
58
+ client_application_name (str):
59
+
60
+ Raises:
61
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
62
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
63
+
64
+ Returns:
65
+ Response[ClientApplication | Error]
66
+ """
67
+
68
+ httpx_request_kwargs = httpx_request_kwargs or {}
69
+
70
+ kwargs = _get_kwargs(
71
+ client_application_name=client_application_name,
72
+ )
73
+ kwargs.update(httpx_request_kwargs)
74
+ response = client.request(
75
+ **kwargs,
76
+ )
77
+
78
+ return _build_response(response=response)
79
+
80
+
81
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
82
+ def sync_from_dict(
83
+ client_application_name: str,
84
+ *,
85
+ client: httpx.Client,
86
+ httpx_request_kwargs: dict[str, Any] | None = None,
87
+ ) -> Response[ClientApplication | Error]:
88
+ httpx_request_kwargs = httpx_request_kwargs or {}
89
+
90
+ kwargs = _get_kwargs(
91
+ client_application_name=client_application_name,
92
+ client=client,
93
+ )
94
+ kwargs.update(httpx_request_kwargs)
95
+ response = client.request(
96
+ **kwargs,
97
+ )
98
+ return _build_response(response=response)
99
+
100
+
101
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
102
+ async def asyncio(
103
+ client_application_name: str,
104
+ *,
105
+ client: httpx.AsyncClient,
106
+ httpx_request_kwargs: dict[str, Any] | None = None,
107
+ ) -> Response[ClientApplication | Error]:
108
+ """Get Client Application
109
+
110
+ Get details of a specific Rigetti system component along with its latest and minimum supported
111
+ versions.
112
+
113
+ Args:
114
+ client_application_name (str):
115
+
116
+ Raises:
117
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
118
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
119
+
120
+ Returns:
121
+ Response[ClientApplication | Error]
122
+ """
123
+
124
+ httpx_request_kwargs = httpx_request_kwargs or {}
125
+ kwargs = _get_kwargs(
126
+ client_application_name=client_application_name,
127
+ )
128
+ kwargs.update(httpx_request_kwargs)
129
+ response = await client.request(**kwargs)
130
+ return _build_response(response=response)
131
+
132
+
133
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
134
+ async def asyncio_from_dict(
135
+ client_application_name: str,
136
+ *,
137
+ client: httpx.AsyncClient,
138
+ httpx_request_kwargs: dict[str, Any] | None = None,
139
+ ) -> Response[ClientApplication | Error]:
140
+ httpx_request_kwargs = httpx_request_kwargs or {}
141
+
142
+ kwargs = _get_kwargs(
143
+ client_application_name=client_application_name,
144
+ client=client,
145
+ )
146
+ kwargs.update(httpx_request_kwargs)
147
+ response = await client.request(
148
+ **kwargs,
149
+ )
150
+
151
+ return _build_response(response=response)
@@ -0,0 +1,129 @@
1
+ from typing import Any
2
+
3
+ import httpx
4
+ from tenacity import retry
5
+
6
+ from ...models.list_client_applications_response import ListClientApplicationsResponse
7
+ from ...types import Response
8
+ from ...util.errors import QCSHTTPStatusError
9
+ from ...util.retry import DEFAULT_RETRY_ARGUMENTS
10
+
11
+
12
+ def _get_kwargs() -> dict[str, Any]:
13
+
14
+ _kwargs: dict[str, Any] = {
15
+ "method": "get",
16
+ "url": "/v1/clientApplications",
17
+ }
18
+
19
+ return _kwargs
20
+
21
+
22
+ def _parse_response(*, response: httpx.Response) -> ListClientApplicationsResponse | None:
23
+ if response.status_code == 200:
24
+ response_200 = ListClientApplicationsResponse.from_dict(response.json())
25
+
26
+ return response_200
27
+
28
+ raise QCSHTTPStatusError(
29
+ message=f"Unexpected response: status code {response.status_code}",
30
+ response=response,
31
+ )
32
+
33
+
34
+ def _build_response(*, response: httpx.Response) -> Response[ListClientApplicationsResponse]:
35
+ """Construct the Response class from the raw ``httpx.Response``."""
36
+ return Response.build_from_httpx_response(response=response, parse_function=_parse_response)
37
+
38
+
39
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
40
+ def sync(
41
+ *,
42
+ client: httpx.Client,
43
+ httpx_request_kwargs: dict[str, Any] | None = None,
44
+ ) -> Response[ListClientApplicationsResponse]:
45
+ """List Client Applications
46
+
47
+ List supported clients of Rigetti system components along with their latest and minimum supported
48
+ versions.
49
+
50
+ Raises:
51
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
52
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
53
+
54
+ Returns:
55
+ Response[ListClientApplicationsResponse]
56
+ """
57
+
58
+ httpx_request_kwargs = httpx_request_kwargs or {}
59
+
60
+ kwargs = _get_kwargs()
61
+ kwargs.update(httpx_request_kwargs)
62
+ response = client.request(
63
+ **kwargs,
64
+ )
65
+
66
+ return _build_response(response=response)
67
+
68
+
69
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
70
+ def sync_from_dict(
71
+ *,
72
+ client: httpx.Client,
73
+ httpx_request_kwargs: dict[str, Any] | None = None,
74
+ ) -> Response[ListClientApplicationsResponse]:
75
+ httpx_request_kwargs = httpx_request_kwargs or {}
76
+
77
+ kwargs = _get_kwargs(
78
+ client=client,
79
+ )
80
+ kwargs.update(httpx_request_kwargs)
81
+ response = client.request(
82
+ **kwargs,
83
+ )
84
+ return _build_response(response=response)
85
+
86
+
87
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
88
+ async def asyncio(
89
+ *,
90
+ client: httpx.AsyncClient,
91
+ httpx_request_kwargs: dict[str, Any] | None = None,
92
+ ) -> Response[ListClientApplicationsResponse]:
93
+ """List Client Applications
94
+
95
+ List supported clients of Rigetti system components along with their latest and minimum supported
96
+ versions.
97
+
98
+ Raises:
99
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
100
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
101
+
102
+ Returns:
103
+ Response[ListClientApplicationsResponse]
104
+ """
105
+
106
+ httpx_request_kwargs = httpx_request_kwargs or {}
107
+ kwargs = _get_kwargs()
108
+ kwargs.update(httpx_request_kwargs)
109
+ response = await client.request(**kwargs)
110
+ return _build_response(response=response)
111
+
112
+
113
+ @retry(**DEFAULT_RETRY_ARGUMENTS)
114
+ async def asyncio_from_dict(
115
+ *,
116
+ client: httpx.AsyncClient,
117
+ httpx_request_kwargs: dict[str, Any] | None = None,
118
+ ) -> Response[ListClientApplicationsResponse]:
119
+ httpx_request_kwargs = httpx_request_kwargs or {}
120
+
121
+ kwargs = _get_kwargs(
122
+ client=client,
123
+ )
124
+ kwargs.update(httpx_request_kwargs)
125
+ response = await client.request(
126
+ **kwargs,
127
+ )
128
+
129
+ return _build_response(response=response)
@@ -0,0 +1 @@
1
+ """Contains endpoint functions for accessing the API"""