policyengine-api-simulation-client 0.20251001.18__tar.gz → 0.20251216.72__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.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/PKG-INFO +2 -3
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/api/default/alive_ping_alive_get.py +9 -9
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/api/default/ping_ping_post.py +17 -17
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/api/default/simulate_simulate_economy_comparison_post.py +17 -17
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/api/default/started_ping_started_get.py +9 -9
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/client.py +13 -13
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/__init__.py +8 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/age_group_baseline_reform_values.py +6 -4
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/baseline_reform_values.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/budgetary_impact.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/cliff_impact.py +4 -2
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/cliff_impact_in_simulation.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/decile_impact.py +4 -2
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/decile_impact_average.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/decile_impact_relative.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/economy_comparison.py +84 -54
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/economy_comparison_detailed_budget_type_0.py +5 -3
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/gender_baseline_reform_values.py +4 -2
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/health_status.py +4 -2
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/hours_response.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/http_validation_error.py +12 -8
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/inequality_impact.py +5 -3
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/intra_decile_impact.py +4 -2
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/intra_decile_impact_all.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/intra_decile_impact_deciles.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values.py +4 -2
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values_all.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values_deciles.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/labor_supply_response.py +5 -3
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/labor_supply_response_decile.py +5 -3
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/labor_supply_response_decile_additional_property.py +5 -3
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/labor_supply_response_decile_additional_property_additional_property.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/labor_supply_response_relative_lsr.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/parameter_change_dict.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/parametric_reform.py +9 -7
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/ping_request.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/ping_response.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/poverty_gender_breakdown.py +4 -2
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/poverty_impact.py +4 -2
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/poverty_racial_breakdown_with_values.py +3 -1
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/probe_status.py +8 -6
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/program_specific_impact.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/racial_baseline_reform_values.py +6 -4
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/simulation_options.py +59 -57
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/simulation_options_data_type_1.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/system_status.py +4 -2
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/uk_constituency_breakdown_by_constituency.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values.py +4 -2
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_by_constituency.py +5 -3
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_outcomes_by_region.py +5 -5
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_outcomes_by_region_additional_property.py +2 -0
- policyengine_api_simulation_client-0.20251216.72/policyengine_api_simulation_client/models/uk_local_authority_breakdown_by_local_authority.py +85 -0
- policyengine_api_simulation_client-0.20251216.72/policyengine_api_simulation_client/models/uk_local_authority_breakdown_with_values.py +71 -0
- policyengine_api_simulation_client-0.20251216.72/policyengine_api_simulation_client/models/uk_local_authority_breakdown_with_values_by_local_authority.py +59 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/validation_error.py +8 -6
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/wealth_decile_impact_with_values.py +4 -2
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/wealth_decile_impact_with_values_average.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/wealth_decile_impact_with_values_relative.py +2 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/types.py +9 -9
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/pyproject.toml +3 -3
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/README.md +0 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/__init__.py +0 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/api/__init__.py +0 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/api/default/__init__.py +0 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/errors.py +0 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/simulation_options_country.py +0 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/models/simulation_options_scope.py +0 -0
- {policyengine_api_simulation_client-0.20251001.18 → policyengine_api_simulation_client-0.20251216.72}/policyengine_api_simulation_client/py.typed +0 -0
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: policyengine_api_simulation_client
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.20251216.72
|
|
4
4
|
Summary: A client library for accessing policyengine-api-simulation
|
|
5
|
-
Requires-Python: >=3.
|
|
5
|
+
Requires-Python: >=3.10,<4.0
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
7
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
8
7
|
Classifier: Programming Language :: Python :: 3.10
|
|
9
8
|
Classifier: Programming Language :: Python :: 3.11
|
|
10
9
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
@@ -18,7 +18,7 @@ def _get_kwargs() -> dict[str, Any]:
|
|
|
18
18
|
return _kwargs
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
def _parse_response(*, client:
|
|
21
|
+
def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> HealthStatus | None:
|
|
22
22
|
if response.status_code == 200:
|
|
23
23
|
response_200 = HealthStatus.from_dict(response.json())
|
|
24
24
|
|
|
@@ -30,7 +30,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt
|
|
|
30
30
|
return None
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
def _build_response(*, client:
|
|
33
|
+
def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[HealthStatus]:
|
|
34
34
|
return Response(
|
|
35
35
|
status_code=HTTPStatus(response.status_code),
|
|
36
36
|
content=response.content,
|
|
@@ -41,7 +41,7 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
|
|
|
41
41
|
|
|
42
42
|
def sync_detailed(
|
|
43
43
|
*,
|
|
44
|
-
client:
|
|
44
|
+
client: AuthenticatedClient | Client,
|
|
45
45
|
) -> Response[HealthStatus]:
|
|
46
46
|
"""Alive
|
|
47
47
|
|
|
@@ -68,8 +68,8 @@ def sync_detailed(
|
|
|
68
68
|
|
|
69
69
|
def sync(
|
|
70
70
|
*,
|
|
71
|
-
client:
|
|
72
|
-
) ->
|
|
71
|
+
client: AuthenticatedClient | Client,
|
|
72
|
+
) -> HealthStatus | None:
|
|
73
73
|
"""Alive
|
|
74
74
|
|
|
75
75
|
Check if the service is healthy. This will always return
|
|
@@ -91,7 +91,7 @@ def sync(
|
|
|
91
91
|
|
|
92
92
|
async def asyncio_detailed(
|
|
93
93
|
*,
|
|
94
|
-
client:
|
|
94
|
+
client: AuthenticatedClient | Client,
|
|
95
95
|
) -> Response[HealthStatus]:
|
|
96
96
|
"""Alive
|
|
97
97
|
|
|
@@ -116,8 +116,8 @@ async def asyncio_detailed(
|
|
|
116
116
|
|
|
117
117
|
async def asyncio(
|
|
118
118
|
*,
|
|
119
|
-
client:
|
|
120
|
-
) ->
|
|
119
|
+
client: AuthenticatedClient | Client,
|
|
120
|
+
) -> HealthStatus | None:
|
|
121
121
|
"""Alive
|
|
122
122
|
|
|
123
123
|
Check if the service is healthy. This will always return
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
@@ -31,8 +31,8 @@ def _get_kwargs(
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def _parse_response(
|
|
34
|
-
*, client:
|
|
35
|
-
) ->
|
|
34
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
35
|
+
) -> HTTPValidationError | PingResponse | None:
|
|
36
36
|
if response.status_code == 200:
|
|
37
37
|
response_200 = PingResponse.from_dict(response.json())
|
|
38
38
|
|
|
@@ -50,8 +50,8 @@ def _parse_response(
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
def _build_response(
|
|
53
|
-
*, client:
|
|
54
|
-
) -> Response[
|
|
53
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
54
|
+
) -> Response[HTTPValidationError | PingResponse]:
|
|
55
55
|
return Response(
|
|
56
56
|
status_code=HTTPStatus(response.status_code),
|
|
57
57
|
content=response.content,
|
|
@@ -62,9 +62,9 @@ def _build_response(
|
|
|
62
62
|
|
|
63
63
|
def sync_detailed(
|
|
64
64
|
*,
|
|
65
|
-
client:
|
|
65
|
+
client: AuthenticatedClient | Client,
|
|
66
66
|
body: PingRequest,
|
|
67
|
-
) -> Response[
|
|
67
|
+
) -> Response[HTTPValidationError | PingResponse]:
|
|
68
68
|
"""Ping
|
|
69
69
|
|
|
70
70
|
Verify the api is able to recieve and process unauthenticated requests.
|
|
@@ -77,7 +77,7 @@ def sync_detailed(
|
|
|
77
77
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
78
78
|
|
|
79
79
|
Returns:
|
|
80
|
-
Response[
|
|
80
|
+
Response[HTTPValidationError | PingResponse]
|
|
81
81
|
"""
|
|
82
82
|
|
|
83
83
|
kwargs = _get_kwargs(
|
|
@@ -93,9 +93,9 @@ def sync_detailed(
|
|
|
93
93
|
|
|
94
94
|
def sync(
|
|
95
95
|
*,
|
|
96
|
-
client:
|
|
96
|
+
client: AuthenticatedClient | Client,
|
|
97
97
|
body: PingRequest,
|
|
98
|
-
) ->
|
|
98
|
+
) -> HTTPValidationError | PingResponse | None:
|
|
99
99
|
"""Ping
|
|
100
100
|
|
|
101
101
|
Verify the api is able to recieve and process unauthenticated requests.
|
|
@@ -108,7 +108,7 @@ def sync(
|
|
|
108
108
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
109
109
|
|
|
110
110
|
Returns:
|
|
111
|
-
|
|
111
|
+
HTTPValidationError | PingResponse
|
|
112
112
|
"""
|
|
113
113
|
|
|
114
114
|
return sync_detailed(
|
|
@@ -119,9 +119,9 @@ def sync(
|
|
|
119
119
|
|
|
120
120
|
async def asyncio_detailed(
|
|
121
121
|
*,
|
|
122
|
-
client:
|
|
122
|
+
client: AuthenticatedClient | Client,
|
|
123
123
|
body: PingRequest,
|
|
124
|
-
) -> Response[
|
|
124
|
+
) -> Response[HTTPValidationError | PingResponse]:
|
|
125
125
|
"""Ping
|
|
126
126
|
|
|
127
127
|
Verify the api is able to recieve and process unauthenticated requests.
|
|
@@ -134,7 +134,7 @@ async def asyncio_detailed(
|
|
|
134
134
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
135
135
|
|
|
136
136
|
Returns:
|
|
137
|
-
Response[
|
|
137
|
+
Response[HTTPValidationError | PingResponse]
|
|
138
138
|
"""
|
|
139
139
|
|
|
140
140
|
kwargs = _get_kwargs(
|
|
@@ -148,9 +148,9 @@ async def asyncio_detailed(
|
|
|
148
148
|
|
|
149
149
|
async def asyncio(
|
|
150
150
|
*,
|
|
151
|
-
client:
|
|
151
|
+
client: AuthenticatedClient | Client,
|
|
152
152
|
body: PingRequest,
|
|
153
|
-
) ->
|
|
153
|
+
) -> HTTPValidationError | PingResponse | None:
|
|
154
154
|
"""Ping
|
|
155
155
|
|
|
156
156
|
Verify the api is able to recieve and process unauthenticated requests.
|
|
@@ -163,7 +163,7 @@ async def asyncio(
|
|
|
163
163
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
164
164
|
|
|
165
165
|
Returns:
|
|
166
|
-
|
|
166
|
+
HTTPValidationError | PingResponse
|
|
167
167
|
"""
|
|
168
168
|
|
|
169
169
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
@@ -31,8 +31,8 @@ def _get_kwargs(
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def _parse_response(
|
|
34
|
-
*, client:
|
|
35
|
-
) ->
|
|
34
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
35
|
+
) -> EconomyComparison | HTTPValidationError | None:
|
|
36
36
|
if response.status_code == 200:
|
|
37
37
|
response_200 = EconomyComparison.from_dict(response.json())
|
|
38
38
|
|
|
@@ -50,8 +50,8 @@ def _parse_response(
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
def _build_response(
|
|
53
|
-
*, client:
|
|
54
|
-
) -> Response[
|
|
53
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
54
|
+
) -> Response[EconomyComparison | HTTPValidationError]:
|
|
55
55
|
return Response(
|
|
56
56
|
status_code=HTTPStatus(response.status_code),
|
|
57
57
|
content=response.content,
|
|
@@ -62,9 +62,9 @@ def _build_response(
|
|
|
62
62
|
|
|
63
63
|
def sync_detailed(
|
|
64
64
|
*,
|
|
65
|
-
client:
|
|
65
|
+
client: AuthenticatedClient | Client,
|
|
66
66
|
body: SimulationOptions,
|
|
67
|
-
) -> Response[
|
|
67
|
+
) -> Response[EconomyComparison | HTTPValidationError]:
|
|
68
68
|
"""Simulate
|
|
69
69
|
|
|
70
70
|
Args:
|
|
@@ -75,7 +75,7 @@ def sync_detailed(
|
|
|
75
75
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
76
76
|
|
|
77
77
|
Returns:
|
|
78
|
-
Response[
|
|
78
|
+
Response[EconomyComparison | HTTPValidationError]
|
|
79
79
|
"""
|
|
80
80
|
|
|
81
81
|
kwargs = _get_kwargs(
|
|
@@ -91,9 +91,9 @@ def sync_detailed(
|
|
|
91
91
|
|
|
92
92
|
def sync(
|
|
93
93
|
*,
|
|
94
|
-
client:
|
|
94
|
+
client: AuthenticatedClient | Client,
|
|
95
95
|
body: SimulationOptions,
|
|
96
|
-
) ->
|
|
96
|
+
) -> EconomyComparison | HTTPValidationError | None:
|
|
97
97
|
"""Simulate
|
|
98
98
|
|
|
99
99
|
Args:
|
|
@@ -104,7 +104,7 @@ def sync(
|
|
|
104
104
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
105
105
|
|
|
106
106
|
Returns:
|
|
107
|
-
|
|
107
|
+
EconomyComparison | HTTPValidationError
|
|
108
108
|
"""
|
|
109
109
|
|
|
110
110
|
return sync_detailed(
|
|
@@ -115,9 +115,9 @@ def sync(
|
|
|
115
115
|
|
|
116
116
|
async def asyncio_detailed(
|
|
117
117
|
*,
|
|
118
|
-
client:
|
|
118
|
+
client: AuthenticatedClient | Client,
|
|
119
119
|
body: SimulationOptions,
|
|
120
|
-
) -> Response[
|
|
120
|
+
) -> Response[EconomyComparison | HTTPValidationError]:
|
|
121
121
|
"""Simulate
|
|
122
122
|
|
|
123
123
|
Args:
|
|
@@ -128,7 +128,7 @@ async def asyncio_detailed(
|
|
|
128
128
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
129
129
|
|
|
130
130
|
Returns:
|
|
131
|
-
Response[
|
|
131
|
+
Response[EconomyComparison | HTTPValidationError]
|
|
132
132
|
"""
|
|
133
133
|
|
|
134
134
|
kwargs = _get_kwargs(
|
|
@@ -142,9 +142,9 @@ async def asyncio_detailed(
|
|
|
142
142
|
|
|
143
143
|
async def asyncio(
|
|
144
144
|
*,
|
|
145
|
-
client:
|
|
145
|
+
client: AuthenticatedClient | Client,
|
|
146
146
|
body: SimulationOptions,
|
|
147
|
-
) ->
|
|
147
|
+
) -> EconomyComparison | HTTPValidationError | None:
|
|
148
148
|
"""Simulate
|
|
149
149
|
|
|
150
150
|
Args:
|
|
@@ -155,7 +155,7 @@ async def asyncio(
|
|
|
155
155
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
156
156
|
|
|
157
157
|
Returns:
|
|
158
|
-
|
|
158
|
+
EconomyComparison | HTTPValidationError
|
|
159
159
|
"""
|
|
160
160
|
|
|
161
161
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
|
-
from typing import Any,
|
|
2
|
+
from typing import Any, cast
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
@@ -17,7 +17,7 @@ def _get_kwargs() -> dict[str, Any]:
|
|
|
17
17
|
return _kwargs
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
def _parse_response(*, client:
|
|
20
|
+
def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> str | None:
|
|
21
21
|
if response.status_code == 200:
|
|
22
22
|
response_200 = cast(str, response.json())
|
|
23
23
|
return response_200
|
|
@@ -28,7 +28,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt
|
|
|
28
28
|
return None
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
def _build_response(*, client:
|
|
31
|
+
def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[str]:
|
|
32
32
|
return Response(
|
|
33
33
|
status_code=HTTPStatus(response.status_code),
|
|
34
34
|
content=response.content,
|
|
@@ -39,7 +39,7 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
|
|
|
39
39
|
|
|
40
40
|
def sync_detailed(
|
|
41
41
|
*,
|
|
42
|
-
client:
|
|
42
|
+
client: AuthenticatedClient | Client,
|
|
43
43
|
) -> Response[str]:
|
|
44
44
|
"""Started
|
|
45
45
|
|
|
@@ -64,8 +64,8 @@ def sync_detailed(
|
|
|
64
64
|
|
|
65
65
|
def sync(
|
|
66
66
|
*,
|
|
67
|
-
client:
|
|
68
|
-
) ->
|
|
67
|
+
client: AuthenticatedClient | Client,
|
|
68
|
+
) -> str | None:
|
|
69
69
|
"""Started
|
|
70
70
|
|
|
71
71
|
Verify the api is running.
|
|
@@ -85,7 +85,7 @@ def sync(
|
|
|
85
85
|
|
|
86
86
|
async def asyncio_detailed(
|
|
87
87
|
*,
|
|
88
|
-
client:
|
|
88
|
+
client: AuthenticatedClient | Client,
|
|
89
89
|
) -> Response[str]:
|
|
90
90
|
"""Started
|
|
91
91
|
|
|
@@ -108,8 +108,8 @@ async def asyncio_detailed(
|
|
|
108
108
|
|
|
109
109
|
async def asyncio(
|
|
110
110
|
*,
|
|
111
|
-
client:
|
|
112
|
-
) ->
|
|
111
|
+
client: AuthenticatedClient | Client,
|
|
112
|
+
) -> str | None:
|
|
113
113
|
"""Started
|
|
114
114
|
|
|
115
115
|
Verify the api is running.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ssl
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
from attrs import define, evolve, field
|
|
@@ -38,12 +38,12 @@ class Client:
|
|
|
38
38
|
_base_url: str = field(alias="base_url")
|
|
39
39
|
_cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies")
|
|
40
40
|
_headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers")
|
|
41
|
-
_timeout:
|
|
42
|
-
_verify_ssl:
|
|
41
|
+
_timeout: httpx.Timeout | None = field(default=None, kw_only=True, alias="timeout")
|
|
42
|
+
_verify_ssl: str | bool | ssl.SSLContext = field(default=True, kw_only=True, alias="verify_ssl")
|
|
43
43
|
_follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects")
|
|
44
44
|
_httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args")
|
|
45
|
-
_client:
|
|
46
|
-
_async_client:
|
|
45
|
+
_client: httpx.Client | None = field(default=None, init=False)
|
|
46
|
+
_async_client: httpx.AsyncClient | None = field(default=None, init=False)
|
|
47
47
|
|
|
48
48
|
def with_headers(self, headers: dict[str, str]) -> "Client":
|
|
49
49
|
"""Get a new client matching this one with additional headers"""
|
|
@@ -62,7 +62,7 @@ class Client:
|
|
|
62
62
|
return evolve(self, cookies={**self._cookies, **cookies})
|
|
63
63
|
|
|
64
64
|
def with_timeout(self, timeout: httpx.Timeout) -> "Client":
|
|
65
|
-
"""Get a new client matching this one with a new timeout
|
|
65
|
+
"""Get a new client matching this one with a new timeout configuration"""
|
|
66
66
|
if self._client is not None:
|
|
67
67
|
self._client.timeout = timeout
|
|
68
68
|
if self._async_client is not None:
|
|
@@ -101,7 +101,7 @@ class Client:
|
|
|
101
101
|
self.get_httpx_client().__exit__(*args, **kwargs)
|
|
102
102
|
|
|
103
103
|
def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "Client":
|
|
104
|
-
"""Manually the underlying httpx.AsyncClient
|
|
104
|
+
"""Manually set the underlying httpx.AsyncClient
|
|
105
105
|
|
|
106
106
|
**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
|
|
107
107
|
"""
|
|
@@ -168,12 +168,12 @@ class AuthenticatedClient:
|
|
|
168
168
|
_base_url: str = field(alias="base_url")
|
|
169
169
|
_cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies")
|
|
170
170
|
_headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers")
|
|
171
|
-
_timeout:
|
|
172
|
-
_verify_ssl:
|
|
171
|
+
_timeout: httpx.Timeout | None = field(default=None, kw_only=True, alias="timeout")
|
|
172
|
+
_verify_ssl: str | bool | ssl.SSLContext = field(default=True, kw_only=True, alias="verify_ssl")
|
|
173
173
|
_follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects")
|
|
174
174
|
_httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args")
|
|
175
|
-
_client:
|
|
176
|
-
_async_client:
|
|
175
|
+
_client: httpx.Client | None = field(default=None, init=False)
|
|
176
|
+
_async_client: httpx.AsyncClient | None = field(default=None, init=False)
|
|
177
177
|
|
|
178
178
|
token: str
|
|
179
179
|
prefix: str = "Bearer"
|
|
@@ -196,7 +196,7 @@ class AuthenticatedClient:
|
|
|
196
196
|
return evolve(self, cookies={**self._cookies, **cookies})
|
|
197
197
|
|
|
198
198
|
def with_timeout(self, timeout: httpx.Timeout) -> "AuthenticatedClient":
|
|
199
|
-
"""Get a new client matching this one with a new timeout
|
|
199
|
+
"""Get a new client matching this one with a new timeout configuration"""
|
|
200
200
|
if self._client is not None:
|
|
201
201
|
self._client.timeout = timeout
|
|
202
202
|
if self._async_client is not None:
|
|
@@ -236,7 +236,7 @@ class AuthenticatedClient:
|
|
|
236
236
|
self.get_httpx_client().__exit__(*args, **kwargs)
|
|
237
237
|
|
|
238
238
|
def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "AuthenticatedClient":
|
|
239
|
-
"""Manually the underlying httpx.AsyncClient
|
|
239
|
+
"""Manually set the underlying httpx.AsyncClient
|
|
240
240
|
|
|
241
241
|
**NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
|
|
242
242
|
"""
|
|
@@ -50,6 +50,11 @@ from .uk_constituency_breakdown_with_values_outcomes_by_region import UKConstitu
|
|
|
50
50
|
from .uk_constituency_breakdown_with_values_outcomes_by_region_additional_property import (
|
|
51
51
|
UKConstituencyBreakdownWithValuesOutcomesByRegionAdditionalProperty,
|
|
52
52
|
)
|
|
53
|
+
from .uk_local_authority_breakdown_by_local_authority import UKLocalAuthorityBreakdownByLocalAuthority
|
|
54
|
+
from .uk_local_authority_breakdown_with_values import UKLocalAuthorityBreakdownWithValues
|
|
55
|
+
from .uk_local_authority_breakdown_with_values_by_local_authority import (
|
|
56
|
+
UKLocalAuthorityBreakdownWithValuesByLocalAuthority,
|
|
57
|
+
)
|
|
53
58
|
from .validation_error import ValidationError
|
|
54
59
|
from .wealth_decile_impact_with_values import WealthDecileImpactWithValues
|
|
55
60
|
from .wealth_decile_impact_with_values_average import WealthDecileImpactWithValuesAverage
|
|
@@ -102,6 +107,9 @@ __all__ = (
|
|
|
102
107
|
"UKConstituencyBreakdownWithValuesByConstituency",
|
|
103
108
|
"UKConstituencyBreakdownWithValuesOutcomesByRegion",
|
|
104
109
|
"UKConstituencyBreakdownWithValuesOutcomesByRegionAdditionalProperty",
|
|
110
|
+
"UKLocalAuthorityBreakdownByLocalAuthority",
|
|
111
|
+
"UKLocalAuthorityBreakdownWithValues",
|
|
112
|
+
"UKLocalAuthorityBreakdownWithValuesByLocalAuthority",
|
|
105
113
|
"ValidationError",
|
|
106
114
|
"WealthDecileImpactWithValues",
|
|
107
115
|
"WealthDecileImpactWithValuesAverage",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
from collections.abc import Mapping
|
|
2
4
|
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
5
|
|
|
@@ -21,10 +23,10 @@ class AgeGroupBaselineReformValues:
|
|
|
21
23
|
all_ (BaselineReformValues):
|
|
22
24
|
"""
|
|
23
25
|
|
|
24
|
-
child:
|
|
25
|
-
adult:
|
|
26
|
-
senior:
|
|
27
|
-
all_:
|
|
26
|
+
child: BaselineReformValues
|
|
27
|
+
adult: BaselineReformValues
|
|
28
|
+
senior: BaselineReformValues
|
|
29
|
+
all_: BaselineReformValues
|
|
28
30
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
31
|
|
|
30
32
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
from collections.abc import Mapping
|
|
2
4
|
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
5
|
|
|
@@ -19,8 +21,8 @@ class CliffImpact:
|
|
|
19
21
|
reform (CliffImpactInSimulation):
|
|
20
22
|
"""
|
|
21
23
|
|
|
22
|
-
baseline:
|
|
23
|
-
reform:
|
|
24
|
+
baseline: CliffImpactInSimulation
|
|
25
|
+
reform: CliffImpactInSimulation
|
|
24
26
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
27
|
|
|
26
28
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
from collections.abc import Mapping
|
|
2
4
|
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
5
|
|
|
@@ -20,8 +22,8 @@ class DecileImpact:
|
|
|
20
22
|
average (DecileImpactAverage):
|
|
21
23
|
"""
|
|
22
24
|
|
|
23
|
-
relative:
|
|
24
|
-
average:
|
|
25
|
+
relative: DecileImpactRelative
|
|
26
|
+
average: DecileImpactAverage
|
|
25
27
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
26
28
|
|
|
27
29
|
def to_dict(self) -> dict[str, Any]:
|