policyengine-api-simulation-client 0.20260112.78__tar.gz → 0.20260114.79__tar.gz
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.
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/PKG-INFO +4 -4
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/README.md +2 -2
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/policyengine_api_simulation_client/__init__.py +1 -1
- policyengine_api_simulation_client-0.20260114.79/policyengine_api_simulation_client/api/default/get_country_versions_versions_country_get.py +172 -0
- policyengine_api_simulation_client-0.20260114.79/policyengine_api_simulation_client/api/default/get_job_status_jobs_job_id_get.py +204 -0
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/api/default/started_ping_started_get.py → policyengine_api_simulation_client-0.20260114.79/policyengine_api_simulation_client/api/default/health_health_get.py +27 -21
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/api/default/alive_ping_alive_get.py → policyengine_api_simulation_client-0.20260114.79/policyengine_api_simulation_client/api/default/list_versions_versions_get.py +27 -29
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/policyengine_api_simulation_client/api/default/ping_ping_post.py +8 -8
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/api/default/simulate_simulate_economy_comparison_post.py → policyengine_api_simulation_client-0.20260114.79/policyengine_api_simulation_client/api/default/submit_simulation_simulate_economy_comparison_post.py +51 -27
- policyengine_api_simulation_client-0.20260114.79/policyengine_api_simulation_client/models/__init__.py +31 -0
- policyengine_api_simulation_client-0.20260114.79/policyengine_api_simulation_client/models/get_country_versions_versions_country_get_response_get_country_versions_versions_country_get.py +46 -0
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/labor_supply_response_relative_lsr.py → policyengine_api_simulation_client-0.20260114.79/policyengine_api_simulation_client/models/health_health_get_response_health_health_get.py +5 -5
- policyengine_api_simulation_client-0.20260114.79/policyengine_api_simulation_client/models/job_status_response.py +122 -0
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/simulation_options_data_type_1.py → policyengine_api_simulation_client-0.20260114.79/policyengine_api_simulation_client/models/job_status_response_result_type_0.py +5 -5
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/program_specific_impact.py → policyengine_api_simulation_client-0.20260114.79/policyengine_api_simulation_client/models/job_submit_response.py +41 -24
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/parameter_change_dict.py → policyengine_api_simulation_client-0.20260114.79/policyengine_api_simulation_client/models/list_versions_versions_get_response_list_versions_versions_get.py +6 -13
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/policyengine_api_simulation_client/models/ping_request.py +2 -1
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/policyengine_api_simulation_client/models/ping_response.py +2 -1
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/probe_status.py → policyengine_api_simulation_client-0.20260114.79/policyengine_api_simulation_client/models/simulation_request.py +24 -31
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/pyproject.toml +2 -2
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/__init__.py +0 -117
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/age_group_baseline_reform_values.py +0 -91
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/baseline_reform_values.py +0 -69
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/budgetary_impact.py +0 -101
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/cliff_impact.py +0 -75
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/cliff_impact_in_simulation.py +0 -69
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/decile_impact.py +0 -77
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/decile_impact_average.py +0 -46
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/decile_impact_relative.py +0 -46
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/economy_comparison.py +0 -366
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/economy_comparison_detailed_budget_type_0.py +0 -59
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/gender_baseline_reform_values.py +0 -75
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/health_status.py +0 -83
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/hours_response.py +0 -93
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/inequality_impact.py +0 -83
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/intra_decile_impact.py +0 -77
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/intra_decile_impact_all.py +0 -46
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/intra_decile_impact_deciles.py +0 -53
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values.py +0 -77
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values_all.py +0 -46
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values_deciles.py +0 -53
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/labor_supply_response.py +0 -119
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/labor_supply_response_decile.py +0 -63
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/labor_supply_response_decile_additional_property.py +0 -65
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/labor_supply_response_decile_additional_property_additional_property.py +0 -46
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/parametric_reform.py +0 -80
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/poverty_gender_breakdown.py +0 -75
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/poverty_impact.py +0 -75
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/poverty_racial_breakdown_with_values.py +0 -67
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/racial_baseline_reform_values.py +0 -91
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/simulation_options.py +0 -309
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/simulation_options_country.py +0 -9
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/simulation_options_scope.py +0 -9
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/system_status.py +0 -91
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/uk_constituency_breakdown_by_constituency.py +0 -85
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values.py +0 -85
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_by_constituency.py +0 -59
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_outcomes_by_region.py +0 -67
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_outcomes_by_region_additional_property.py +0 -46
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/uk_local_authority_breakdown_by_local_authority.py +0 -85
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/uk_local_authority_breakdown_with_values.py +0 -71
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/uk_local_authority_breakdown_with_values_by_local_authority.py +0 -59
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/wealth_decile_impact_with_values.py +0 -77
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/wealth_decile_impact_with_values_average.py +0 -46
- policyengine_api_simulation_client-0.20260112.78/policyengine_api_simulation_client/models/wealth_decile_impact_with_values_relative.py +0 -46
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/policyengine_api_simulation_client/api/__init__.py +0 -0
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/policyengine_api_simulation_client/api/default/__init__.py +0 -0
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/policyengine_api_simulation_client/client.py +0 -0
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/policyengine_api_simulation_client/errors.py +0 -0
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/policyengine_api_simulation_client/models/http_validation_error.py +0 -0
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/policyengine_api_simulation_client/models/validation_error.py +0 -0
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/policyengine_api_simulation_client/py.typed +0 -0
- {policyengine_api_simulation_client-0.20260112.78 → policyengine_api_simulation_client-0.20260114.79}/policyengine_api_simulation_client/types.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: policyengine_api_simulation_client
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: A client library for accessing
|
|
3
|
+
Version: 0.20260114.79
|
|
4
|
+
Summary: A client library for accessing PolicyEngine Simulation Gateway API
|
|
5
5
|
Requires-Python: >=3.10,<4.0
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
7
7
|
Classifier: Programming Language :: Python :: 3.10
|
|
@@ -14,8 +14,8 @@ Requires-Dist: httpx (>=0.23.0,<0.29.0)
|
|
|
14
14
|
Requires-Dist: python-dateutil (>=2.8.0,<3.0.0)
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
|
|
17
|
-
#
|
|
18
|
-
A client library for accessing
|
|
17
|
+
# policyengine_api_simulation_client
|
|
18
|
+
A client library for accessing PolicyEngine Simulation Gateway API
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
21
21
|
First, create a client:
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
from urllib.parse import quote
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.get_country_versions_versions_country_get_response_get_country_versions_versions_country_get import (
|
|
10
|
+
GetCountryVersionsVersionsCountryGetResponseGetCountryVersionsVersionsCountryGet,
|
|
11
|
+
)
|
|
12
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
13
|
+
from ...types import Response
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _get_kwargs(
|
|
17
|
+
country: str,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
_kwargs: dict[str, Any] = {
|
|
20
|
+
"method": "get",
|
|
21
|
+
"url": "/versions/{country}".format(
|
|
22
|
+
country=quote(str(country), safe=""),
|
|
23
|
+
),
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return _kwargs
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _parse_response(
|
|
30
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
31
|
+
) -> GetCountryVersionsVersionsCountryGetResponseGetCountryVersionsVersionsCountryGet | HTTPValidationError | None:
|
|
32
|
+
if response.status_code == 200:
|
|
33
|
+
response_200 = GetCountryVersionsVersionsCountryGetResponseGetCountryVersionsVersionsCountryGet.from_dict(
|
|
34
|
+
response.json()
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
return response_200
|
|
38
|
+
|
|
39
|
+
if response.status_code == 422:
|
|
40
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
41
|
+
|
|
42
|
+
return response_422
|
|
43
|
+
|
|
44
|
+
if client.raise_on_unexpected_status:
|
|
45
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
46
|
+
else:
|
|
47
|
+
return None
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _build_response(
|
|
51
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
52
|
+
) -> Response[GetCountryVersionsVersionsCountryGetResponseGetCountryVersionsVersionsCountryGet | HTTPValidationError]:
|
|
53
|
+
return Response(
|
|
54
|
+
status_code=HTTPStatus(response.status_code),
|
|
55
|
+
content=response.content,
|
|
56
|
+
headers=response.headers,
|
|
57
|
+
parsed=_parse_response(client=client, response=response),
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def sync_detailed(
|
|
62
|
+
country: str,
|
|
63
|
+
*,
|
|
64
|
+
client: AuthenticatedClient | Client,
|
|
65
|
+
) -> Response[GetCountryVersionsVersionsCountryGetResponseGetCountryVersionsVersionsCountryGet | HTTPValidationError]:
|
|
66
|
+
"""Get Country Versions
|
|
67
|
+
|
|
68
|
+
Get available versions for a specific country.
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
country (str):
|
|
72
|
+
|
|
73
|
+
Raises:
|
|
74
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
75
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
Response[GetCountryVersionsVersionsCountryGetResponseGetCountryVersionsVersionsCountryGet | HTTPValidationError]
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
kwargs = _get_kwargs(
|
|
82
|
+
country=country,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
response = client.get_httpx_client().request(
|
|
86
|
+
**kwargs,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
return _build_response(client=client, response=response)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def sync(
|
|
93
|
+
country: str,
|
|
94
|
+
*,
|
|
95
|
+
client: AuthenticatedClient | Client,
|
|
96
|
+
) -> GetCountryVersionsVersionsCountryGetResponseGetCountryVersionsVersionsCountryGet | HTTPValidationError | None:
|
|
97
|
+
"""Get Country Versions
|
|
98
|
+
|
|
99
|
+
Get available versions for a specific country.
|
|
100
|
+
|
|
101
|
+
Args:
|
|
102
|
+
country (str):
|
|
103
|
+
|
|
104
|
+
Raises:
|
|
105
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
106
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
107
|
+
|
|
108
|
+
Returns:
|
|
109
|
+
GetCountryVersionsVersionsCountryGetResponseGetCountryVersionsVersionsCountryGet | HTTPValidationError
|
|
110
|
+
"""
|
|
111
|
+
|
|
112
|
+
return sync_detailed(
|
|
113
|
+
country=country,
|
|
114
|
+
client=client,
|
|
115
|
+
).parsed
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
async def asyncio_detailed(
|
|
119
|
+
country: str,
|
|
120
|
+
*,
|
|
121
|
+
client: AuthenticatedClient | Client,
|
|
122
|
+
) -> Response[GetCountryVersionsVersionsCountryGetResponseGetCountryVersionsVersionsCountryGet | HTTPValidationError]:
|
|
123
|
+
"""Get Country Versions
|
|
124
|
+
|
|
125
|
+
Get available versions for a specific country.
|
|
126
|
+
|
|
127
|
+
Args:
|
|
128
|
+
country (str):
|
|
129
|
+
|
|
130
|
+
Raises:
|
|
131
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
132
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
133
|
+
|
|
134
|
+
Returns:
|
|
135
|
+
Response[GetCountryVersionsVersionsCountryGetResponseGetCountryVersionsVersionsCountryGet | HTTPValidationError]
|
|
136
|
+
"""
|
|
137
|
+
|
|
138
|
+
kwargs = _get_kwargs(
|
|
139
|
+
country=country,
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
143
|
+
|
|
144
|
+
return _build_response(client=client, response=response)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
async def asyncio(
|
|
148
|
+
country: str,
|
|
149
|
+
*,
|
|
150
|
+
client: AuthenticatedClient | Client,
|
|
151
|
+
) -> GetCountryVersionsVersionsCountryGetResponseGetCountryVersionsVersionsCountryGet | HTTPValidationError | None:
|
|
152
|
+
"""Get Country Versions
|
|
153
|
+
|
|
154
|
+
Get available versions for a specific country.
|
|
155
|
+
|
|
156
|
+
Args:
|
|
157
|
+
country (str):
|
|
158
|
+
|
|
159
|
+
Raises:
|
|
160
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
161
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
162
|
+
|
|
163
|
+
Returns:
|
|
164
|
+
GetCountryVersionsVersionsCountryGetResponseGetCountryVersionsVersionsCountryGet | HTTPValidationError
|
|
165
|
+
"""
|
|
166
|
+
|
|
167
|
+
return (
|
|
168
|
+
await asyncio_detailed(
|
|
169
|
+
country=country,
|
|
170
|
+
client=client,
|
|
171
|
+
)
|
|
172
|
+
).parsed
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, cast
|
|
3
|
+
from urllib.parse import quote
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
10
|
+
from ...models.job_status_response import JobStatusResponse
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
job_id: str,
|
|
16
|
+
) -> dict[str, Any]:
|
|
17
|
+
_kwargs: dict[str, Any] = {
|
|
18
|
+
"method": "get",
|
|
19
|
+
"url": "/jobs/{job_id}".format(
|
|
20
|
+
job_id=quote(str(job_id), safe=""),
|
|
21
|
+
),
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return _kwargs
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _parse_response(
|
|
28
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
29
|
+
) -> Any | HTTPValidationError | JobStatusResponse | None:
|
|
30
|
+
if response.status_code == 200:
|
|
31
|
+
response_200 = JobStatusResponse.from_dict(response.json())
|
|
32
|
+
|
|
33
|
+
return response_200
|
|
34
|
+
|
|
35
|
+
if response.status_code == 202:
|
|
36
|
+
response_202 = cast(Any, None)
|
|
37
|
+
return response_202
|
|
38
|
+
|
|
39
|
+
if response.status_code == 404:
|
|
40
|
+
response_404 = cast(Any, None)
|
|
41
|
+
return response_404
|
|
42
|
+
|
|
43
|
+
if response.status_code == 422:
|
|
44
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
45
|
+
|
|
46
|
+
return response_422
|
|
47
|
+
|
|
48
|
+
if response.status_code == 500:
|
|
49
|
+
response_500 = cast(Any, None)
|
|
50
|
+
return response_500
|
|
51
|
+
|
|
52
|
+
if client.raise_on_unexpected_status:
|
|
53
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
54
|
+
else:
|
|
55
|
+
return None
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _build_response(
|
|
59
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
60
|
+
) -> Response[Any | HTTPValidationError | JobStatusResponse]:
|
|
61
|
+
return Response(
|
|
62
|
+
status_code=HTTPStatus(response.status_code),
|
|
63
|
+
content=response.content,
|
|
64
|
+
headers=response.headers,
|
|
65
|
+
parsed=_parse_response(client=client, response=response),
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def sync_detailed(
|
|
70
|
+
job_id: str,
|
|
71
|
+
*,
|
|
72
|
+
client: AuthenticatedClient | Client,
|
|
73
|
+
) -> Response[Any | HTTPValidationError | JobStatusResponse]:
|
|
74
|
+
r"""Get Job Status
|
|
75
|
+
|
|
76
|
+
Poll for job status.
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
- 200 with status=\"complete\" and result when done
|
|
80
|
+
- 202 with status=\"running\" while in progress
|
|
81
|
+
- 404 if job_id not found
|
|
82
|
+
- 500 with status=\"failed\" and error on failure
|
|
83
|
+
|
|
84
|
+
Args:
|
|
85
|
+
job_id (str):
|
|
86
|
+
|
|
87
|
+
Raises:
|
|
88
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
89
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
90
|
+
|
|
91
|
+
Returns:
|
|
92
|
+
Response[Any | HTTPValidationError | JobStatusResponse]
|
|
93
|
+
"""
|
|
94
|
+
|
|
95
|
+
kwargs = _get_kwargs(
|
|
96
|
+
job_id=job_id,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
response = client.get_httpx_client().request(
|
|
100
|
+
**kwargs,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
return _build_response(client=client, response=response)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def sync(
|
|
107
|
+
job_id: str,
|
|
108
|
+
*,
|
|
109
|
+
client: AuthenticatedClient | Client,
|
|
110
|
+
) -> Any | HTTPValidationError | JobStatusResponse | None:
|
|
111
|
+
r"""Get Job Status
|
|
112
|
+
|
|
113
|
+
Poll for job status.
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
- 200 with status=\"complete\" and result when done
|
|
117
|
+
- 202 with status=\"running\" while in progress
|
|
118
|
+
- 404 if job_id not found
|
|
119
|
+
- 500 with status=\"failed\" and error on failure
|
|
120
|
+
|
|
121
|
+
Args:
|
|
122
|
+
job_id (str):
|
|
123
|
+
|
|
124
|
+
Raises:
|
|
125
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
126
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
127
|
+
|
|
128
|
+
Returns:
|
|
129
|
+
Any | HTTPValidationError | JobStatusResponse
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
return sync_detailed(
|
|
133
|
+
job_id=job_id,
|
|
134
|
+
client=client,
|
|
135
|
+
).parsed
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
async def asyncio_detailed(
|
|
139
|
+
job_id: str,
|
|
140
|
+
*,
|
|
141
|
+
client: AuthenticatedClient | Client,
|
|
142
|
+
) -> Response[Any | HTTPValidationError | JobStatusResponse]:
|
|
143
|
+
r"""Get Job Status
|
|
144
|
+
|
|
145
|
+
Poll for job status.
|
|
146
|
+
|
|
147
|
+
Returns:
|
|
148
|
+
- 200 with status=\"complete\" and result when done
|
|
149
|
+
- 202 with status=\"running\" while in progress
|
|
150
|
+
- 404 if job_id not found
|
|
151
|
+
- 500 with status=\"failed\" and error on failure
|
|
152
|
+
|
|
153
|
+
Args:
|
|
154
|
+
job_id (str):
|
|
155
|
+
|
|
156
|
+
Raises:
|
|
157
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
158
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
159
|
+
|
|
160
|
+
Returns:
|
|
161
|
+
Response[Any | HTTPValidationError | JobStatusResponse]
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
kwargs = _get_kwargs(
|
|
165
|
+
job_id=job_id,
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
169
|
+
|
|
170
|
+
return _build_response(client=client, response=response)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
async def asyncio(
|
|
174
|
+
job_id: str,
|
|
175
|
+
*,
|
|
176
|
+
client: AuthenticatedClient | Client,
|
|
177
|
+
) -> Any | HTTPValidationError | JobStatusResponse | None:
|
|
178
|
+
r"""Get Job Status
|
|
179
|
+
|
|
180
|
+
Poll for job status.
|
|
181
|
+
|
|
182
|
+
Returns:
|
|
183
|
+
- 200 with status=\"complete\" and result when done
|
|
184
|
+
- 202 with status=\"running\" while in progress
|
|
185
|
+
- 404 if job_id not found
|
|
186
|
+
- 500 with status=\"failed\" and error on failure
|
|
187
|
+
|
|
188
|
+
Args:
|
|
189
|
+
job_id (str):
|
|
190
|
+
|
|
191
|
+
Raises:
|
|
192
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
193
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
194
|
+
|
|
195
|
+
Returns:
|
|
196
|
+
Any | HTTPValidationError | JobStatusResponse
|
|
197
|
+
"""
|
|
198
|
+
|
|
199
|
+
return (
|
|
200
|
+
await asyncio_detailed(
|
|
201
|
+
job_id=job_id,
|
|
202
|
+
client=client,
|
|
203
|
+
)
|
|
204
|
+
).parsed
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.health_health_get_response_health_health_get import HealthHealthGetResponseHealthHealthGet
|
|
8
9
|
from ...types import Response
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
def _get_kwargs() -> dict[str, Any]:
|
|
12
13
|
_kwargs: dict[str, Any] = {
|
|
13
14
|
"method": "get",
|
|
14
|
-
"url": "/
|
|
15
|
+
"url": "/health",
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
return _kwargs
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
def _parse_response(
|
|
21
|
+
def _parse_response(
|
|
22
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
23
|
+
) -> HealthHealthGetResponseHealthHealthGet | None:
|
|
21
24
|
if response.status_code == 200:
|
|
22
|
-
response_200 =
|
|
25
|
+
response_200 = HealthHealthGetResponseHealthHealthGet.from_dict(response.json())
|
|
26
|
+
|
|
23
27
|
return response_200
|
|
24
28
|
|
|
25
29
|
if client.raise_on_unexpected_status:
|
|
@@ -28,7 +32,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
|
|
|
28
32
|
return None
|
|
29
33
|
|
|
30
34
|
|
|
31
|
-
def _build_response(
|
|
35
|
+
def _build_response(
|
|
36
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
37
|
+
) -> Response[HealthHealthGetResponseHealthHealthGet]:
|
|
32
38
|
return Response(
|
|
33
39
|
status_code=HTTPStatus(response.status_code),
|
|
34
40
|
content=response.content,
|
|
@@ -40,17 +46,17 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res
|
|
|
40
46
|
def sync_detailed(
|
|
41
47
|
*,
|
|
42
48
|
client: AuthenticatedClient | Client,
|
|
43
|
-
) -> Response[
|
|
44
|
-
"""
|
|
49
|
+
) -> Response[HealthHealthGetResponseHealthHealthGet]:
|
|
50
|
+
"""Health
|
|
45
51
|
|
|
46
|
-
|
|
52
|
+
Health check endpoint.
|
|
47
53
|
|
|
48
54
|
Raises:
|
|
49
55
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
50
56
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
51
57
|
|
|
52
58
|
Returns:
|
|
53
|
-
Response[
|
|
59
|
+
Response[HealthHealthGetResponseHealthHealthGet]
|
|
54
60
|
"""
|
|
55
61
|
|
|
56
62
|
kwargs = _get_kwargs()
|
|
@@ -65,17 +71,17 @@ def sync_detailed(
|
|
|
65
71
|
def sync(
|
|
66
72
|
*,
|
|
67
73
|
client: AuthenticatedClient | Client,
|
|
68
|
-
) ->
|
|
69
|
-
"""
|
|
74
|
+
) -> HealthHealthGetResponseHealthHealthGet | None:
|
|
75
|
+
"""Health
|
|
70
76
|
|
|
71
|
-
|
|
77
|
+
Health check endpoint.
|
|
72
78
|
|
|
73
79
|
Raises:
|
|
74
80
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
75
81
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
76
82
|
|
|
77
83
|
Returns:
|
|
78
|
-
|
|
84
|
+
HealthHealthGetResponseHealthHealthGet
|
|
79
85
|
"""
|
|
80
86
|
|
|
81
87
|
return sync_detailed(
|
|
@@ -86,17 +92,17 @@ def sync(
|
|
|
86
92
|
async def asyncio_detailed(
|
|
87
93
|
*,
|
|
88
94
|
client: AuthenticatedClient | Client,
|
|
89
|
-
) -> Response[
|
|
90
|
-
"""
|
|
95
|
+
) -> Response[HealthHealthGetResponseHealthHealthGet]:
|
|
96
|
+
"""Health
|
|
91
97
|
|
|
92
|
-
|
|
98
|
+
Health check endpoint.
|
|
93
99
|
|
|
94
100
|
Raises:
|
|
95
101
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
96
102
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
97
103
|
|
|
98
104
|
Returns:
|
|
99
|
-
Response[
|
|
105
|
+
Response[HealthHealthGetResponseHealthHealthGet]
|
|
100
106
|
"""
|
|
101
107
|
|
|
102
108
|
kwargs = _get_kwargs()
|
|
@@ -109,17 +115,17 @@ async def asyncio_detailed(
|
|
|
109
115
|
async def asyncio(
|
|
110
116
|
*,
|
|
111
117
|
client: AuthenticatedClient | Client,
|
|
112
|
-
) ->
|
|
113
|
-
"""
|
|
118
|
+
) -> HealthHealthGetResponseHealthHealthGet | None:
|
|
119
|
+
"""Health
|
|
114
120
|
|
|
115
|
-
|
|
121
|
+
Health check endpoint.
|
|
116
122
|
|
|
117
123
|
Raises:
|
|
118
124
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
119
125
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
120
126
|
|
|
121
127
|
Returns:
|
|
122
|
-
|
|
128
|
+
HealthHealthGetResponseHealthHealthGet
|
|
123
129
|
"""
|
|
124
130
|
|
|
125
131
|
return (
|
|
@@ -5,22 +5,26 @@ import httpx
|
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import AuthenticatedClient, Client
|
|
8
|
-
from ...models.
|
|
8
|
+
from ...models.list_versions_versions_get_response_list_versions_versions_get import (
|
|
9
|
+
ListVersionsVersionsGetResponseListVersionsVersionsGet,
|
|
10
|
+
)
|
|
9
11
|
from ...types import Response
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
def _get_kwargs() -> dict[str, Any]:
|
|
13
15
|
_kwargs: dict[str, Any] = {
|
|
14
16
|
"method": "get",
|
|
15
|
-
"url": "/
|
|
17
|
+
"url": "/versions",
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
return _kwargs
|
|
19
21
|
|
|
20
22
|
|
|
21
|
-
def _parse_response(
|
|
23
|
+
def _parse_response(
|
|
24
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
25
|
+
) -> ListVersionsVersionsGetResponseListVersionsVersionsGet | None:
|
|
22
26
|
if response.status_code == 200:
|
|
23
|
-
response_200 =
|
|
27
|
+
response_200 = ListVersionsVersionsGetResponseListVersionsVersionsGet.from_dict(response.json())
|
|
24
28
|
|
|
25
29
|
return response_200
|
|
26
30
|
|
|
@@ -30,7 +34,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
|
|
|
30
34
|
return None
|
|
31
35
|
|
|
32
36
|
|
|
33
|
-
def _build_response(
|
|
37
|
+
def _build_response(
|
|
38
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
39
|
+
) -> Response[ListVersionsVersionsGetResponseListVersionsVersionsGet]:
|
|
34
40
|
return Response(
|
|
35
41
|
status_code=HTTPStatus(response.status_code),
|
|
36
42
|
content=response.content,
|
|
@@ -42,19 +48,17 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res
|
|
|
42
48
|
def sync_detailed(
|
|
43
49
|
*,
|
|
44
50
|
client: AuthenticatedClient | Client,
|
|
45
|
-
) -> Response[
|
|
46
|
-
"""
|
|
51
|
+
) -> Response[ListVersionsVersionsGetResponseListVersionsVersionsGet]:
|
|
52
|
+
"""List Versions
|
|
47
53
|
|
|
48
|
-
|
|
49
|
-
data, but will return a 503 response code if the service is
|
|
50
|
-
unhealthy.
|
|
54
|
+
List all available versions for all countries.
|
|
51
55
|
|
|
52
56
|
Raises:
|
|
53
57
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
54
58
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
55
59
|
|
|
56
60
|
Returns:
|
|
57
|
-
Response[
|
|
61
|
+
Response[ListVersionsVersionsGetResponseListVersionsVersionsGet]
|
|
58
62
|
"""
|
|
59
63
|
|
|
60
64
|
kwargs = _get_kwargs()
|
|
@@ -69,19 +73,17 @@ def sync_detailed(
|
|
|
69
73
|
def sync(
|
|
70
74
|
*,
|
|
71
75
|
client: AuthenticatedClient | Client,
|
|
72
|
-
) ->
|
|
73
|
-
"""
|
|
76
|
+
) -> ListVersionsVersionsGetResponseListVersionsVersionsGet | None:
|
|
77
|
+
"""List Versions
|
|
74
78
|
|
|
75
|
-
|
|
76
|
-
data, but will return a 503 response code if the service is
|
|
77
|
-
unhealthy.
|
|
79
|
+
List all available versions for all countries.
|
|
78
80
|
|
|
79
81
|
Raises:
|
|
80
82
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
81
83
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
82
84
|
|
|
83
85
|
Returns:
|
|
84
|
-
|
|
86
|
+
ListVersionsVersionsGetResponseListVersionsVersionsGet
|
|
85
87
|
"""
|
|
86
88
|
|
|
87
89
|
return sync_detailed(
|
|
@@ -92,19 +94,17 @@ def sync(
|
|
|
92
94
|
async def asyncio_detailed(
|
|
93
95
|
*,
|
|
94
96
|
client: AuthenticatedClient | Client,
|
|
95
|
-
) -> Response[
|
|
96
|
-
"""
|
|
97
|
+
) -> Response[ListVersionsVersionsGetResponseListVersionsVersionsGet]:
|
|
98
|
+
"""List Versions
|
|
97
99
|
|
|
98
|
-
|
|
99
|
-
data, but will return a 503 response code if the service is
|
|
100
|
-
unhealthy.
|
|
100
|
+
List all available versions for all countries.
|
|
101
101
|
|
|
102
102
|
Raises:
|
|
103
103
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
104
104
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
105
105
|
|
|
106
106
|
Returns:
|
|
107
|
-
Response[
|
|
107
|
+
Response[ListVersionsVersionsGetResponseListVersionsVersionsGet]
|
|
108
108
|
"""
|
|
109
109
|
|
|
110
110
|
kwargs = _get_kwargs()
|
|
@@ -117,19 +117,17 @@ async def asyncio_detailed(
|
|
|
117
117
|
async def asyncio(
|
|
118
118
|
*,
|
|
119
119
|
client: AuthenticatedClient | Client,
|
|
120
|
-
) ->
|
|
121
|
-
"""
|
|
120
|
+
) -> ListVersionsVersionsGetResponseListVersionsVersionsGet | None:
|
|
121
|
+
"""List Versions
|
|
122
122
|
|
|
123
|
-
|
|
124
|
-
data, but will return a 503 response code if the service is
|
|
125
|
-
unhealthy.
|
|
123
|
+
List all available versions for all countries.
|
|
126
124
|
|
|
127
125
|
Raises:
|
|
128
126
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
129
127
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
130
128
|
|
|
131
129
|
Returns:
|
|
132
|
-
|
|
130
|
+
ListVersionsVersionsGetResponseListVersionsVersionsGet
|
|
133
131
|
"""
|
|
134
132
|
|
|
135
133
|
return (
|