policyengine-api-simulation-client 0.20251216.73__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 (68) hide show
  1. policyengine_api_simulation_client/__init__.py +8 -0
  2. policyengine_api_simulation_client/api/__init__.py +1 -0
  3. policyengine_api_simulation_client/api/default/__init__.py +1 -0
  4. policyengine_api_simulation_client/api/default/alive_ping_alive_get.py +139 -0
  5. policyengine_api_simulation_client/api/default/ping_ping_post.py +174 -0
  6. policyengine_api_simulation_client/api/default/simulate_simulate_economy_comparison_post.py +166 -0
  7. policyengine_api_simulation_client/api/default/started_ping_started_get.py +129 -0
  8. policyengine_api_simulation_client/client.py +268 -0
  9. policyengine_api_simulation_client/errors.py +16 -0
  10. policyengine_api_simulation_client/models/__init__.py +117 -0
  11. policyengine_api_simulation_client/models/age_group_baseline_reform_values.py +91 -0
  12. policyengine_api_simulation_client/models/baseline_reform_values.py +69 -0
  13. policyengine_api_simulation_client/models/budgetary_impact.py +101 -0
  14. policyengine_api_simulation_client/models/cliff_impact.py +75 -0
  15. policyengine_api_simulation_client/models/cliff_impact_in_simulation.py +69 -0
  16. policyengine_api_simulation_client/models/decile_impact.py +77 -0
  17. policyengine_api_simulation_client/models/decile_impact_average.py +46 -0
  18. policyengine_api_simulation_client/models/decile_impact_relative.py +46 -0
  19. policyengine_api_simulation_client/models/economy_comparison.py +366 -0
  20. policyengine_api_simulation_client/models/economy_comparison_detailed_budget_type_0.py +59 -0
  21. policyengine_api_simulation_client/models/gender_baseline_reform_values.py +75 -0
  22. policyengine_api_simulation_client/models/health_status.py +83 -0
  23. policyengine_api_simulation_client/models/hours_response.py +93 -0
  24. policyengine_api_simulation_client/models/http_validation_error.py +79 -0
  25. policyengine_api_simulation_client/models/inequality_impact.py +83 -0
  26. policyengine_api_simulation_client/models/intra_decile_impact.py +77 -0
  27. policyengine_api_simulation_client/models/intra_decile_impact_all.py +46 -0
  28. policyengine_api_simulation_client/models/intra_decile_impact_deciles.py +53 -0
  29. policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values.py +77 -0
  30. policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values_all.py +46 -0
  31. policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values_deciles.py +53 -0
  32. policyengine_api_simulation_client/models/labor_supply_response.py +119 -0
  33. policyengine_api_simulation_client/models/labor_supply_response_decile.py +63 -0
  34. policyengine_api_simulation_client/models/labor_supply_response_decile_additional_property.py +65 -0
  35. policyengine_api_simulation_client/models/labor_supply_response_decile_additional_property_additional_property.py +46 -0
  36. policyengine_api_simulation_client/models/labor_supply_response_relative_lsr.py +46 -0
  37. policyengine_api_simulation_client/models/parameter_change_dict.py +53 -0
  38. policyengine_api_simulation_client/models/parametric_reform.py +80 -0
  39. policyengine_api_simulation_client/models/ping_request.py +61 -0
  40. policyengine_api_simulation_client/models/ping_response.py +61 -0
  41. policyengine_api_simulation_client/models/poverty_gender_breakdown.py +75 -0
  42. policyengine_api_simulation_client/models/poverty_impact.py +75 -0
  43. policyengine_api_simulation_client/models/poverty_racial_breakdown_with_values.py +67 -0
  44. policyengine_api_simulation_client/models/probe_status.py +91 -0
  45. policyengine_api_simulation_client/models/program_specific_impact.py +77 -0
  46. policyengine_api_simulation_client/models/racial_baseline_reform_values.py +91 -0
  47. policyengine_api_simulation_client/models/simulation_options.py +309 -0
  48. policyengine_api_simulation_client/models/simulation_options_country.py +9 -0
  49. policyengine_api_simulation_client/models/simulation_options_data_type_1.py +46 -0
  50. policyengine_api_simulation_client/models/simulation_options_scope.py +9 -0
  51. policyengine_api_simulation_client/models/system_status.py +91 -0
  52. policyengine_api_simulation_client/models/uk_constituency_breakdown_by_constituency.py +85 -0
  53. policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values.py +85 -0
  54. policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_by_constituency.py +59 -0
  55. policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_outcomes_by_region.py +67 -0
  56. policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_outcomes_by_region_additional_property.py +46 -0
  57. policyengine_api_simulation_client/models/uk_local_authority_breakdown_by_local_authority.py +85 -0
  58. policyengine_api_simulation_client/models/uk_local_authority_breakdown_with_values.py +71 -0
  59. policyengine_api_simulation_client/models/uk_local_authority_breakdown_with_values_by_local_authority.py +59 -0
  60. policyengine_api_simulation_client/models/validation_error.py +90 -0
  61. policyengine_api_simulation_client/models/wealth_decile_impact_with_values.py +77 -0
  62. policyengine_api_simulation_client/models/wealth_decile_impact_with_values_average.py +46 -0
  63. policyengine_api_simulation_client/models/wealth_decile_impact_with_values_relative.py +46 -0
  64. policyengine_api_simulation_client/py.typed +1 -0
  65. policyengine_api_simulation_client/types.py +54 -0
  66. policyengine_api_simulation_client-0.20251216.73.dist-info/METADATA +141 -0
  67. policyengine_api_simulation_client-0.20251216.73.dist-info/RECORD +68 -0
  68. policyengine_api_simulation_client-0.20251216.73.dist-info/WHEEL +4 -0
@@ -0,0 +1,67 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ if TYPE_CHECKING:
10
+ from ..models.uk_constituency_breakdown_with_values_outcomes_by_region_additional_property import (
11
+ UKConstituencyBreakdownWithValuesOutcomesByRegionAdditionalProperty,
12
+ )
13
+
14
+
15
+ T = TypeVar("T", bound="UKConstituencyBreakdownWithValuesOutcomesByRegion")
16
+
17
+
18
+ @_attrs_define
19
+ class UKConstituencyBreakdownWithValuesOutcomesByRegion:
20
+ """ """
21
+
22
+ additional_properties: dict[str, UKConstituencyBreakdownWithValuesOutcomesByRegionAdditionalProperty] = (
23
+ _attrs_field(init=False, factory=dict)
24
+ )
25
+
26
+ def to_dict(self) -> dict[str, Any]:
27
+ field_dict: dict[str, Any] = {}
28
+ for prop_name, prop in self.additional_properties.items():
29
+ field_dict[prop_name] = prop.to_dict()
30
+
31
+ return field_dict
32
+
33
+ @classmethod
34
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
35
+ from ..models.uk_constituency_breakdown_with_values_outcomes_by_region_additional_property import (
36
+ UKConstituencyBreakdownWithValuesOutcomesByRegionAdditionalProperty,
37
+ )
38
+
39
+ d = dict(src_dict)
40
+ uk_constituency_breakdown_with_values_outcomes_by_region = cls()
41
+
42
+ additional_properties = {}
43
+ for prop_name, prop_dict in d.items():
44
+ additional_property = UKConstituencyBreakdownWithValuesOutcomesByRegionAdditionalProperty.from_dict(
45
+ prop_dict
46
+ )
47
+
48
+ additional_properties[prop_name] = additional_property
49
+
50
+ uk_constituency_breakdown_with_values_outcomes_by_region.additional_properties = additional_properties
51
+ return uk_constituency_breakdown_with_values_outcomes_by_region
52
+
53
+ @property
54
+ def additional_keys(self) -> list[str]:
55
+ return list(self.additional_properties.keys())
56
+
57
+ def __getitem__(self, key: str) -> UKConstituencyBreakdownWithValuesOutcomesByRegionAdditionalProperty:
58
+ return self.additional_properties[key]
59
+
60
+ def __setitem__(self, key: str, value: UKConstituencyBreakdownWithValuesOutcomesByRegionAdditionalProperty) -> None:
61
+ self.additional_properties[key] = value
62
+
63
+ def __delitem__(self, key: str) -> None:
64
+ del self.additional_properties[key]
65
+
66
+ def __contains__(self, key: str) -> bool:
67
+ return key in self.additional_properties
@@ -0,0 +1,46 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ T = TypeVar("T", bound="UKConstituencyBreakdownWithValuesOutcomesByRegionAdditionalProperty")
10
+
11
+
12
+ @_attrs_define
13
+ class UKConstituencyBreakdownWithValuesOutcomesByRegionAdditionalProperty:
14
+ """ """
15
+
16
+ additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict)
17
+
18
+ def to_dict(self) -> dict[str, Any]:
19
+ field_dict: dict[str, Any] = {}
20
+ field_dict.update(self.additional_properties)
21
+
22
+ return field_dict
23
+
24
+ @classmethod
25
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
26
+ d = dict(src_dict)
27
+ uk_constituency_breakdown_with_values_outcomes_by_region_additional_property = cls()
28
+
29
+ uk_constituency_breakdown_with_values_outcomes_by_region_additional_property.additional_properties = d
30
+ return uk_constituency_breakdown_with_values_outcomes_by_region_additional_property
31
+
32
+ @property
33
+ def additional_keys(self) -> list[str]:
34
+ return list(self.additional_properties.keys())
35
+
36
+ def __getitem__(self, key: str) -> int:
37
+ return self.additional_properties[key]
38
+
39
+ def __setitem__(self, key: str, value: int) -> None:
40
+ self.additional_properties[key] = value
41
+
42
+ def __delitem__(self, key: str) -> None:
43
+ del self.additional_properties[key]
44
+
45
+ def __contains__(self, key: str) -> bool:
46
+ return key in self.additional_properties
@@ -0,0 +1,85 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ T = TypeVar("T", bound="UKLocalAuthorityBreakdownByLocalAuthority")
10
+
11
+
12
+ @_attrs_define
13
+ class UKLocalAuthorityBreakdownByLocalAuthority:
14
+ """
15
+ Attributes:
16
+ average_household_income_change (float):
17
+ relative_household_income_change (float):
18
+ x (int):
19
+ y (int):
20
+ """
21
+
22
+ average_household_income_change: float
23
+ relative_household_income_change: float
24
+ x: int
25
+ y: int
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ average_household_income_change = self.average_household_income_change
30
+
31
+ relative_household_income_change = self.relative_household_income_change
32
+
33
+ x = self.x
34
+
35
+ y = self.y
36
+
37
+ field_dict: dict[str, Any] = {}
38
+ field_dict.update(self.additional_properties)
39
+ field_dict.update(
40
+ {
41
+ "average_household_income_change": average_household_income_change,
42
+ "relative_household_income_change": relative_household_income_change,
43
+ "x": x,
44
+ "y": y,
45
+ }
46
+ )
47
+
48
+ return field_dict
49
+
50
+ @classmethod
51
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
52
+ d = dict(src_dict)
53
+ average_household_income_change = d.pop("average_household_income_change")
54
+
55
+ relative_household_income_change = d.pop("relative_household_income_change")
56
+
57
+ x = d.pop("x")
58
+
59
+ y = d.pop("y")
60
+
61
+ uk_local_authority_breakdown_by_local_authority = cls(
62
+ average_household_income_change=average_household_income_change,
63
+ relative_household_income_change=relative_household_income_change,
64
+ x=x,
65
+ y=y,
66
+ )
67
+
68
+ uk_local_authority_breakdown_by_local_authority.additional_properties = d
69
+ return uk_local_authority_breakdown_by_local_authority
70
+
71
+ @property
72
+ def additional_keys(self) -> list[str]:
73
+ return list(self.additional_properties.keys())
74
+
75
+ def __getitem__(self, key: str) -> Any:
76
+ return self.additional_properties[key]
77
+
78
+ def __setitem__(self, key: str, value: Any) -> None:
79
+ self.additional_properties[key] = value
80
+
81
+ def __delitem__(self, key: str) -> None:
82
+ del self.additional_properties[key]
83
+
84
+ def __contains__(self, key: str) -> bool:
85
+ return key in self.additional_properties
@@ -0,0 +1,71 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ if TYPE_CHECKING:
10
+ from ..models.uk_local_authority_breakdown_with_values_by_local_authority import (
11
+ UKLocalAuthorityBreakdownWithValuesByLocalAuthority,
12
+ )
13
+
14
+
15
+ T = TypeVar("T", bound="UKLocalAuthorityBreakdownWithValues")
16
+
17
+
18
+ @_attrs_define
19
+ class UKLocalAuthorityBreakdownWithValues:
20
+ """
21
+ Attributes:
22
+ by_local_authority (UKLocalAuthorityBreakdownWithValuesByLocalAuthority):
23
+ """
24
+
25
+ by_local_authority: UKLocalAuthorityBreakdownWithValuesByLocalAuthority
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ by_local_authority = self.by_local_authority.to_dict()
30
+
31
+ field_dict: dict[str, Any] = {}
32
+ field_dict.update(self.additional_properties)
33
+ field_dict.update(
34
+ {
35
+ "by_local_authority": by_local_authority,
36
+ }
37
+ )
38
+
39
+ return field_dict
40
+
41
+ @classmethod
42
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
43
+ from ..models.uk_local_authority_breakdown_with_values_by_local_authority import (
44
+ UKLocalAuthorityBreakdownWithValuesByLocalAuthority,
45
+ )
46
+
47
+ d = dict(src_dict)
48
+ by_local_authority = UKLocalAuthorityBreakdownWithValuesByLocalAuthority.from_dict(d.pop("by_local_authority"))
49
+
50
+ uk_local_authority_breakdown_with_values = cls(
51
+ by_local_authority=by_local_authority,
52
+ )
53
+
54
+ uk_local_authority_breakdown_with_values.additional_properties = d
55
+ return uk_local_authority_breakdown_with_values
56
+
57
+ @property
58
+ def additional_keys(self) -> list[str]:
59
+ return list(self.additional_properties.keys())
60
+
61
+ def __getitem__(self, key: str) -> Any:
62
+ return self.additional_properties[key]
63
+
64
+ def __setitem__(self, key: str, value: Any) -> None:
65
+ self.additional_properties[key] = value
66
+
67
+ def __delitem__(self, key: str) -> None:
68
+ del self.additional_properties[key]
69
+
70
+ def __contains__(self, key: str) -> bool:
71
+ return key in self.additional_properties
@@ -0,0 +1,59 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ if TYPE_CHECKING:
10
+ from ..models.uk_local_authority_breakdown_by_local_authority import UKLocalAuthorityBreakdownByLocalAuthority
11
+
12
+
13
+ T = TypeVar("T", bound="UKLocalAuthorityBreakdownWithValuesByLocalAuthority")
14
+
15
+
16
+ @_attrs_define
17
+ class UKLocalAuthorityBreakdownWithValuesByLocalAuthority:
18
+ """ """
19
+
20
+ additional_properties: dict[str, UKLocalAuthorityBreakdownByLocalAuthority] = _attrs_field(init=False, factory=dict)
21
+
22
+ def to_dict(self) -> dict[str, Any]:
23
+ field_dict: dict[str, Any] = {}
24
+ for prop_name, prop in self.additional_properties.items():
25
+ field_dict[prop_name] = prop.to_dict()
26
+
27
+ return field_dict
28
+
29
+ @classmethod
30
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
31
+ from ..models.uk_local_authority_breakdown_by_local_authority import UKLocalAuthorityBreakdownByLocalAuthority
32
+
33
+ d = dict(src_dict)
34
+ uk_local_authority_breakdown_with_values_by_local_authority = cls()
35
+
36
+ additional_properties = {}
37
+ for prop_name, prop_dict in d.items():
38
+ additional_property = UKLocalAuthorityBreakdownByLocalAuthority.from_dict(prop_dict)
39
+
40
+ additional_properties[prop_name] = additional_property
41
+
42
+ uk_local_authority_breakdown_with_values_by_local_authority.additional_properties = additional_properties
43
+ return uk_local_authority_breakdown_with_values_by_local_authority
44
+
45
+ @property
46
+ def additional_keys(self) -> list[str]:
47
+ return list(self.additional_properties.keys())
48
+
49
+ def __getitem__(self, key: str) -> UKLocalAuthorityBreakdownByLocalAuthority:
50
+ return self.additional_properties[key]
51
+
52
+ def __setitem__(self, key: str, value: UKLocalAuthorityBreakdownByLocalAuthority) -> None:
53
+ self.additional_properties[key] = value
54
+
55
+ def __delitem__(self, key: str) -> None:
56
+ del self.additional_properties[key]
57
+
58
+ def __contains__(self, key: str) -> bool:
59
+ return key in self.additional_properties
@@ -0,0 +1,90 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar, cast
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ T = TypeVar("T", bound="ValidationError")
10
+
11
+
12
+ @_attrs_define
13
+ class ValidationError:
14
+ """
15
+ Attributes:
16
+ loc (list[int | str]):
17
+ msg (str):
18
+ type_ (str):
19
+ """
20
+
21
+ loc: list[int | str]
22
+ msg: str
23
+ type_: str
24
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
25
+
26
+ def to_dict(self) -> dict[str, Any]:
27
+ loc = []
28
+ for loc_item_data in self.loc:
29
+ loc_item: int | str
30
+ loc_item = loc_item_data
31
+ loc.append(loc_item)
32
+
33
+ msg = self.msg
34
+
35
+ type_ = self.type_
36
+
37
+ field_dict: dict[str, Any] = {}
38
+ field_dict.update(self.additional_properties)
39
+ field_dict.update(
40
+ {
41
+ "loc": loc,
42
+ "msg": msg,
43
+ "type": type_,
44
+ }
45
+ )
46
+
47
+ return field_dict
48
+
49
+ @classmethod
50
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
51
+ d = dict(src_dict)
52
+ loc = []
53
+ _loc = d.pop("loc")
54
+ for loc_item_data in _loc:
55
+
56
+ def _parse_loc_item(data: object) -> int | str:
57
+ return cast(int | str, data)
58
+
59
+ loc_item = _parse_loc_item(loc_item_data)
60
+
61
+ loc.append(loc_item)
62
+
63
+ msg = d.pop("msg")
64
+
65
+ type_ = d.pop("type")
66
+
67
+ validation_error = cls(
68
+ loc=loc,
69
+ msg=msg,
70
+ type_=type_,
71
+ )
72
+
73
+ validation_error.additional_properties = d
74
+ return validation_error
75
+
76
+ @property
77
+ def additional_keys(self) -> list[str]:
78
+ return list(self.additional_properties.keys())
79
+
80
+ def __getitem__(self, key: str) -> Any:
81
+ return self.additional_properties[key]
82
+
83
+ def __setitem__(self, key: str, value: Any) -> None:
84
+ self.additional_properties[key] = value
85
+
86
+ def __delitem__(self, key: str) -> None:
87
+ del self.additional_properties[key]
88
+
89
+ def __contains__(self, key: str) -> bool:
90
+ return key in self.additional_properties
@@ -0,0 +1,77 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import TYPE_CHECKING, Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ if TYPE_CHECKING:
10
+ from ..models.wealth_decile_impact_with_values_average import WealthDecileImpactWithValuesAverage
11
+ from ..models.wealth_decile_impact_with_values_relative import WealthDecileImpactWithValuesRelative
12
+
13
+
14
+ T = TypeVar("T", bound="WealthDecileImpactWithValues")
15
+
16
+
17
+ @_attrs_define
18
+ class WealthDecileImpactWithValues:
19
+ """
20
+ Attributes:
21
+ relative (WealthDecileImpactWithValuesRelative):
22
+ average (WealthDecileImpactWithValuesAverage):
23
+ """
24
+
25
+ relative: WealthDecileImpactWithValuesRelative
26
+ average: WealthDecileImpactWithValuesAverage
27
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
28
+
29
+ def to_dict(self) -> dict[str, Any]:
30
+ relative = self.relative.to_dict()
31
+
32
+ average = self.average.to_dict()
33
+
34
+ field_dict: dict[str, Any] = {}
35
+ field_dict.update(self.additional_properties)
36
+ field_dict.update(
37
+ {
38
+ "relative": relative,
39
+ "average": average,
40
+ }
41
+ )
42
+
43
+ return field_dict
44
+
45
+ @classmethod
46
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
47
+ from ..models.wealth_decile_impact_with_values_average import WealthDecileImpactWithValuesAverage
48
+ from ..models.wealth_decile_impact_with_values_relative import WealthDecileImpactWithValuesRelative
49
+
50
+ d = dict(src_dict)
51
+ relative = WealthDecileImpactWithValuesRelative.from_dict(d.pop("relative"))
52
+
53
+ average = WealthDecileImpactWithValuesAverage.from_dict(d.pop("average"))
54
+
55
+ wealth_decile_impact_with_values = cls(
56
+ relative=relative,
57
+ average=average,
58
+ )
59
+
60
+ wealth_decile_impact_with_values.additional_properties = d
61
+ return wealth_decile_impact_with_values
62
+
63
+ @property
64
+ def additional_keys(self) -> list[str]:
65
+ return list(self.additional_properties.keys())
66
+
67
+ def __getitem__(self, key: str) -> Any:
68
+ return self.additional_properties[key]
69
+
70
+ def __setitem__(self, key: str, value: Any) -> None:
71
+ self.additional_properties[key] = value
72
+
73
+ def __delitem__(self, key: str) -> None:
74
+ del self.additional_properties[key]
75
+
76
+ def __contains__(self, key: str) -> bool:
77
+ return key in self.additional_properties
@@ -0,0 +1,46 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ T = TypeVar("T", bound="WealthDecileImpactWithValuesAverage")
10
+
11
+
12
+ @_attrs_define
13
+ class WealthDecileImpactWithValuesAverage:
14
+ """ """
15
+
16
+ additional_properties: dict[str, float] = _attrs_field(init=False, factory=dict)
17
+
18
+ def to_dict(self) -> dict[str, Any]:
19
+ field_dict: dict[str, Any] = {}
20
+ field_dict.update(self.additional_properties)
21
+
22
+ return field_dict
23
+
24
+ @classmethod
25
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
26
+ d = dict(src_dict)
27
+ wealth_decile_impact_with_values_average = cls()
28
+
29
+ wealth_decile_impact_with_values_average.additional_properties = d
30
+ return wealth_decile_impact_with_values_average
31
+
32
+ @property
33
+ def additional_keys(self) -> list[str]:
34
+ return list(self.additional_properties.keys())
35
+
36
+ def __getitem__(self, key: str) -> float:
37
+ return self.additional_properties[key]
38
+
39
+ def __setitem__(self, key: str, value: float) -> None:
40
+ self.additional_properties[key] = value
41
+
42
+ def __delitem__(self, key: str) -> None:
43
+ del self.additional_properties[key]
44
+
45
+ def __contains__(self, key: str) -> bool:
46
+ return key in self.additional_properties
@@ -0,0 +1,46 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ T = TypeVar("T", bound="WealthDecileImpactWithValuesRelative")
10
+
11
+
12
+ @_attrs_define
13
+ class WealthDecileImpactWithValuesRelative:
14
+ """ """
15
+
16
+ additional_properties: dict[str, float] = _attrs_field(init=False, factory=dict)
17
+
18
+ def to_dict(self) -> dict[str, Any]:
19
+ field_dict: dict[str, Any] = {}
20
+ field_dict.update(self.additional_properties)
21
+
22
+ return field_dict
23
+
24
+ @classmethod
25
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
26
+ d = dict(src_dict)
27
+ wealth_decile_impact_with_values_relative = cls()
28
+
29
+ wealth_decile_impact_with_values_relative.additional_properties = d
30
+ return wealth_decile_impact_with_values_relative
31
+
32
+ @property
33
+ def additional_keys(self) -> list[str]:
34
+ return list(self.additional_properties.keys())
35
+
36
+ def __getitem__(self, key: str) -> float:
37
+ return self.additional_properties[key]
38
+
39
+ def __setitem__(self, key: str, value: float) -> None:
40
+ self.additional_properties[key] = value
41
+
42
+ def __delitem__(self, key: str) -> None:
43
+ del self.additional_properties[key]
44
+
45
+ def __contains__(self, key: str) -> bool:
46
+ return key in self.additional_properties
@@ -0,0 +1 @@
1
+ # Marker file for PEP 561
@@ -0,0 +1,54 @@
1
+ """Contains some shared types for properties"""
2
+
3
+ from collections.abc import Mapping, MutableMapping
4
+ from http import HTTPStatus
5
+ from typing import IO, BinaryIO, Generic, Literal, TypeVar
6
+
7
+ from attrs import define
8
+
9
+
10
+ class Unset:
11
+ def __bool__(self) -> Literal[False]:
12
+ return False
13
+
14
+
15
+ UNSET: Unset = Unset()
16
+
17
+ # The types that `httpx.Client(files=)` can accept, copied from that library.
18
+ FileContent = IO[bytes] | bytes | str
19
+ FileTypes = (
20
+ # (filename, file (or bytes), content_type)
21
+ tuple[str | None, FileContent, str | None]
22
+ # (filename, file (or bytes), content_type, headers)
23
+ | tuple[str | None, FileContent, str | None, Mapping[str, str]]
24
+ )
25
+ RequestFiles = list[tuple[str, FileTypes]]
26
+
27
+
28
+ @define
29
+ class File:
30
+ """Contains information for file uploads"""
31
+
32
+ payload: BinaryIO
33
+ file_name: str | None = None
34
+ mime_type: str | None = None
35
+
36
+ def to_tuple(self) -> FileTypes:
37
+ """Return a tuple representation that httpx will accept for multipart/form-data"""
38
+ return self.file_name, self.payload, self.mime_type
39
+
40
+
41
+ T = TypeVar("T")
42
+
43
+
44
+ @define
45
+ class Response(Generic[T]):
46
+ """A response from an endpoint"""
47
+
48
+ status_code: HTTPStatus
49
+ content: bytes
50
+ headers: MutableMapping[str, str]
51
+ parsed: T | None
52
+
53
+
54
+ __all__ = ["UNSET", "File", "FileTypes", "RequestFiles", "Response", "Unset"]