policyengine-api-simulation-client 0.20251210.56__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 (65) 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 +109 -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 +338 -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/validation_error.py +90 -0
  58. policyengine_api_simulation_client/models/wealth_decile_impact_with_values.py +77 -0
  59. policyengine_api_simulation_client/models/wealth_decile_impact_with_values_average.py +46 -0
  60. policyengine_api_simulation_client/models/wealth_decile_impact_with_values_relative.py +46 -0
  61. policyengine_api_simulation_client/py.typed +1 -0
  62. policyengine_api_simulation_client/types.py +54 -0
  63. policyengine_api_simulation_client-0.20251210.56.dist-info/METADATA +141 -0
  64. policyengine_api_simulation_client-0.20251210.56.dist-info/RECORD +65 -0
  65. policyengine_api_simulation_client-0.20251210.56.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,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"]
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.4
2
+ Name: policyengine_api_simulation_client
3
+ Version: 0.20251210.56
4
+ Summary: A client library for accessing policyengine-api-simulation
5
+ Requires-Python: >=3.10,<4.0
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Programming Language :: Python :: 3.10
8
+ Classifier: Programming Language :: Python :: 3.11
9
+ Classifier: Programming Language :: Python :: 3.12
10
+ Classifier: Programming Language :: Python :: 3.13
11
+ Classifier: Programming Language :: Python :: 3.14
12
+ Requires-Dist: attrs (>=22.2.0)
13
+ Requires-Dist: httpx (>=0.23.0,<0.29.0)
14
+ Requires-Dist: python-dateutil (>=2.8.0,<3.0.0)
15
+ Description-Content-Type: text/markdown
16
+
17
+ # policyengine-api-simulation-client
18
+ A client library for accessing policyengine-api-simulation
19
+
20
+ ## Usage
21
+ First, create a client:
22
+
23
+ ```python
24
+ from policyengine_api_simulation_client import Client
25
+
26
+ client = Client(base_url="https://api.example.com")
27
+ ```
28
+
29
+ If the endpoints you're going to hit require authentication, use `AuthenticatedClient` instead:
30
+
31
+ ```python
32
+ from policyengine_api_simulation_client import AuthenticatedClient
33
+
34
+ client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken")
35
+ ```
36
+
37
+ Now call your endpoint and use your models:
38
+
39
+ ```python
40
+ from policyengine_api_simulation_client.models import MyDataModel
41
+ from policyengine_api_simulation_client.api.my_tag import get_my_data_model
42
+ from policyengine_api_simulation_client.types import Response
43
+
44
+ with client as client:
45
+ my_data: MyDataModel = get_my_data_model.sync(client=client)
46
+ # or if you need more info (e.g. status_code)
47
+ response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client)
48
+ ```
49
+
50
+ Or do the same thing with an async version:
51
+
52
+ ```python
53
+ from policyengine_api_simulation_client.models import MyDataModel
54
+ from policyengine_api_simulation_client.api.my_tag import get_my_data_model
55
+ from policyengine_api_simulation_client.types import Response
56
+
57
+ async with client as client:
58
+ my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
59
+ response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)
60
+ ```
61
+
62
+ By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.
63
+
64
+ ```python
65
+ client = AuthenticatedClient(
66
+ base_url="https://internal_api.example.com",
67
+ token="SuperSecretToken",
68
+ verify_ssl="/path/to/certificate_bundle.pem",
69
+ )
70
+ ```
71
+
72
+ You can also disable certificate validation altogether, but beware that **this is a security risk**.
73
+
74
+ ```python
75
+ client = AuthenticatedClient(
76
+ base_url="https://internal_api.example.com",
77
+ token="SuperSecretToken",
78
+ verify_ssl=False
79
+ )
80
+ ```
81
+
82
+ Things to know:
83
+ 1. Every path/method combo becomes a Python module with four functions:
84
+ 1. `sync`: Blocking request that returns parsed data (if successful) or `None`
85
+ 1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful.
86
+ 1. `asyncio`: Like `sync` but async instead of blocking
87
+ 1. `asyncio_detailed`: Like `sync_detailed` but async instead of blocking
88
+
89
+ 1. All path/query params, and bodies become method arguments.
90
+ 1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)
91
+ 1. Any endpoint which did not have a tag will be in `policyengine_api_simulation_client.api.default`
92
+
93
+ ## Advanced customizations
94
+
95
+ There are more settings on the generated `Client` class which let you control more runtime behavior, check out the docstring on that class for more info. You can also customize the underlying `httpx.Client` or `httpx.AsyncClient` (depending on your use-case):
96
+
97
+ ```python
98
+ from policyengine_api_simulation_client import Client
99
+
100
+ def log_request(request):
101
+ print(f"Request event hook: {request.method} {request.url} - Waiting for response")
102
+
103
+ def log_response(response):
104
+ request = response.request
105
+ print(f"Response event hook: {request.method} {request.url} - Status {response.status_code}")
106
+
107
+ client = Client(
108
+ base_url="https://api.example.com",
109
+ httpx_args={"event_hooks": {"request": [log_request], "response": [log_response]}},
110
+ )
111
+
112
+ # Or get the underlying httpx client to modify directly with client.get_httpx_client() or client.get_async_httpx_client()
113
+ ```
114
+
115
+ You can even set the httpx client directly, but beware that this will override any existing settings (e.g., base_url):
116
+
117
+ ```python
118
+ import httpx
119
+ from policyengine_api_simulation_client import Client
120
+
121
+ client = Client(
122
+ base_url="https://api.example.com",
123
+ )
124
+ # Note that base_url needs to be re-set, as would any shared cookies, headers, etc.
125
+ client.set_httpx_client(httpx.Client(base_url="https://api.example.com", proxies="http://localhost:8030"))
126
+ ```
127
+
128
+ ## Building / publishing this package
129
+ This project uses [Poetry](https://python-poetry.org/) to manage dependencies and packaging. Here are the basics:
130
+ 1. Update the metadata in pyproject.toml (e.g. authors, version)
131
+ 1. If you're using a private repository, configure it with Poetry
132
+ 1. `poetry config repositories.<your-repository-name> <url-to-your-repository>`
133
+ 1. `poetry config http-basic.<your-repository-name> <username> <password>`
134
+ 1. Publish the client with `poetry publish --build -r <your-repository-name>` or, if for public PyPI, just `poetry publish --build`
135
+
136
+ If you want to install this client into another project without publishing it (e.g. for development) then:
137
+ 1. If that project **is using Poetry**, you can simply do `poetry add <path-to-this-client>` from that project
138
+ 1. If that project is not using Poetry:
139
+ 1. Build a wheel with `poetry build -f wheel`
140
+ 1. Install that wheel from the other project `pip install <path-to-wheel>`
141
+
@@ -0,0 +1,65 @@
1
+ policyengine_api_simulation_client/__init__.py,sha256=DkqeRurQfv7yFv-FvDV8zgazIJb20EMUGiD5r_s4bkE,170
2
+ policyengine_api_simulation_client/api/__init__.py,sha256=zTSiG_ujSjAqWPyc435YXaX9XTlpMjiJWBbV-f-YtdA,45
3
+ policyengine_api_simulation_client/api/default/__init__.py,sha256=5vd9uJWAjRqa9xzxzYkLD1yoZ12Ld_bAaNB5WX4fbE8,56
4
+ policyengine_api_simulation_client/api/default/alive_ping_alive_get.py,sha256=wGo9vfH3kNIh9bGx6hW-Fs4BnQr2in-2Knhvjp-fNmU,3677
5
+ policyengine_api_simulation_client/api/default/ping_ping_post.py,sha256=qW_zP0xHXcc-0sp4Cod875scqSkddtNoKFPn9hv9-Ws,4415
6
+ policyengine_api_simulation_client/api/default/simulate_simulate_economy_comparison_post.py,sha256=jDr0hT3TNI1z-2Pkz7t5uEHWsLE6L-Nk3VlNUYx8cio,4273
7
+ policyengine_api_simulation_client/api/default/started_ping_started_get.py,sha256=e84OuAcmmxO8lZoJvKWvP7FZdGnWJNQaZVjooG3Ts6I,3104
8
+ policyengine_api_simulation_client/client.py,sha256=-rT3epMc77Y7QMTy5o1oH5hkGLufY9qFrD1rb7qItFU,12384
9
+ policyengine_api_simulation_client/errors.py,sha256=gO8GBmKqmSNgAg-E5oT-oOyxztvp7V_6XG7OUTT15q0,546
10
+ policyengine_api_simulation_client/models/__init__.py,sha256=9E7s7jARNJndcHKu0OWVdPv2fG5DbEzjEpzl2gMmwwQ,5189
11
+ policyengine_api_simulation_client/models/age_group_baseline_reform_values.py,sha256=RK3NgZPMSdX5M8_kwSZtuui6UQTk__hRGYpBxGzRgu8,2516
12
+ policyengine_api_simulation_client/models/baseline_reform_values.py,sha256=GrT6iPQXOCqjfJVKoDJI093aMvDR1w14Gv45Yxu92hw,1732
13
+ policyengine_api_simulation_client/models/budgetary_impact.py,sha256=adwQfvTZb-cuMTyoGlP6U2mitS6q98c5HUIGCktFqfs,3092
14
+ policyengine_api_simulation_client/models/cliff_impact.py,sha256=UcmZv3wsESe_6IEldZV_NSpG75W44M34Lyi4rrR0HIU,2038
15
+ policyengine_api_simulation_client/models/cliff_impact_in_simulation.py,sha256=UhB86tWs9bv2WYf49442u-7ERCJpQreLcs1XFDv6i_Q,1810
16
+ policyengine_api_simulation_client/models/decile_impact.py,sha256=AIt1kKCzW3wOqrsFDlogfrd9-qsjWuuSZpJINrN1d0w,2156
17
+ policyengine_api_simulation_client/models/decile_impact_average.py,sha256=oWvEWt354q0ftjCYfDSjz6NRixCl6kr9oT19LRWBKQg,1285
18
+ policyengine_api_simulation_client/models/decile_impact_relative.py,sha256=ZZeOFoD4pAHnHvjJrA2HNmfVuRKY3IZW9cw2tNASJX0,1290
19
+ policyengine_api_simulation_client/models/economy_comparison.py,sha256=S6WGmn5cXBlnCZmmZaRFq7NUelPHP3iK0llj3uY2Wzk,13959
20
+ policyengine_api_simulation_client/models/economy_comparison_detailed_budget_type_0.py,sha256=gMuH8gOgvtBVyMMWPQ_qoV9eeMvdoCjfyvy5g81iaiM,1921
21
+ policyengine_api_simulation_client/models/gender_baseline_reform_values.py,sha256=H195mhesO388I8rke4P79Eg-MEi3oXshczFoXVs278w,2047
22
+ policyengine_api_simulation_client/models/health_status.py,sha256=LiKPWIsFyJIO_SGOzhJDGm39MhryYrj1TAGiOSWrmMw,2166
23
+ policyengine_api_simulation_client/models/hours_response.py,sha256=5CZsRZN3MLcPZ6j9sKRE1icSJh0TzpEmjq3AvIuoNR0,2395
24
+ policyengine_api_simulation_client/models/http_validation_error.py,sha256=ceDDkSqsvFmTdFwrra6lwo-L-BAHNX8h8bwaKyxPkEk,2317
25
+ policyengine_api_simulation_client/models/inequality_impact.py,sha256=g_2og077SpjUrzDAqqDxZjgmAdOE2iujS5Btkm8cUIU,2420
26
+ policyengine_api_simulation_client/models/intra_decile_impact.py,sha256=qwyj7j23Yp8WzrvnrTHAiquqA7RKpR7DhFbHcXf7lMc,2181
27
+ policyengine_api_simulation_client/models/intra_decile_impact_all.py,sha256=Nqyv8B8O1PU93813tDAoTKYdU0WAV1QwYTGDy7O2Qqw,1293
28
+ policyengine_api_simulation_client/models/intra_decile_impact_deciles.py,sha256=MKEGAkfR7GBp78eY2tcqD1NUVIfMY0wcuhyy_O4fgDk,1625
29
+ policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values.py,sha256=plHF9npxmn_StVKX4Te1a2m17Z-4MBJc6qcIx-XznSo,2506
30
+ policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values_all.py,sha256=xzfuBIGVVcjTQ7q-NW1P6qYolSU0FnpW_1lOAFZB-Ow,1382
31
+ policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values_deciles.py,sha256=4jrv2kX7wdA9U69UPat9c5Bj1rw1e4QrtsN-1FsB3LM,1714
32
+ policyengine_api_simulation_client/models/labor_supply_response.py,sha256=YO4fv09qAiz3FpkXWqc20jh5mW0C4IveFTHuUa-2ucA,3610
33
+ policyengine_api_simulation_client/models/labor_supply_response_decile.py,sha256=DpCIg_X1o5umEounL1YSk-SVvq-hilrn_YqDcK7xP1o,2081
34
+ policyengine_api_simulation_client/models/labor_supply_response_decile_additional_property.py,sha256=66xuGaB9u9TG4fgy6mUtRe1jU37kttvgRbtdixz2vJY,2342
35
+ policyengine_api_simulation_client/models/labor_supply_response_decile_additional_property_additional_property.py,sha256=hZdsD8uaiQzx-qSUslDfCOEHxVdKtGByN8YyIfkQWAs,1510
36
+ policyengine_api_simulation_client/models/labor_supply_response_relative_lsr.py,sha256=iKpKbD76s3_-RFeHMvMmZF86OxWmU-dJ3Y_SlYiIVs0,1340
37
+ policyengine_api_simulation_client/models/parameter_change_dict.py,sha256=x6aA69PKaPFDpyz-m7MGVnj18GjdtfkL4d1wqtx_baA,1519
38
+ policyengine_api_simulation_client/models/parametric_reform.py,sha256=tLbMS-CTPv606NNiAnJ1N_RUo2sBIL0O1AHJ-sUrgvA,2656
39
+ policyengine_api_simulation_client/models/ping_request.py,sha256=Vr2YosQfwtbA-i1HtpPtDuBpehzyCMs8jnx9dnC4xV0,1483
40
+ policyengine_api_simulation_client/models/ping_response.py,sha256=9DPdeZZUP4t-zVTMHj3WuoemPJZNB8NRTdGVQItge58,1548
41
+ policyengine_api_simulation_client/models/poverty_gender_breakdown.py,sha256=aLJu3kKuCG0pAt-2oYUnKtMYuA3B3cMJsG7R-1CgxyQ,2176
42
+ policyengine_api_simulation_client/models/poverty_impact.py,sha256=v0HhCByx4P-mzdd2E2LjNlWw5WO-4jXYvcZg_UMXyq4,2150
43
+ policyengine_api_simulation_client/models/poverty_racial_breakdown_with_values.py,sha256=bgzMRnzfR5XRyN_-56A2hWR1vZ7INi0LTuQwwe3FRdA,1915
44
+ policyengine_api_simulation_client/models/probe_status.py,sha256=l4FjPsjvTnbbw3pnNVhloA2TzJfXj0yuoaN7me8sRBY,2329
45
+ policyengine_api_simulation_client/models/program_specific_impact.py,sha256=GGoQ4_WViiIq55rGDDFyjv0JhD8PBDHWFHQeCn9c8Zs,1944
46
+ policyengine_api_simulation_client/models/racial_baseline_reform_values.py,sha256=x-kvyJZsMAX-7c5uGsKa7gBH15sxo5wWmUZrN15gprs,2535
47
+ policyengine_api_simulation_client/models/simulation_options.py,sha256=4XXtUcBynwIGG5CmHyAvEZ0cLsqylkZSGpvQHjuf7_0,11383
48
+ policyengine_api_simulation_client/models/simulation_options_country.py,sha256=KG7RcCnbdPxZvryKLkFZueuaiBQz4n2y82O76OjRCSM,157
49
+ policyengine_api_simulation_client/models/simulation_options_data_type_1.py,sha256=UqeONxOCCI0ThVzXQvDC-1GX-FKJEGOMhZkiStY-EWE,1320
50
+ policyengine_api_simulation_client/models/simulation_options_scope.py,sha256=wOcfAg2pRUiMFIRtk4mmvO3rV-LOxOAHuSVgUgrWHGY,175
51
+ policyengine_api_simulation_client/models/system_status.py,sha256=JhUvozsy5Rfcvd6lZA9k4wae4-AoIk72KoV4hQ_5a58,2280
52
+ policyengine_api_simulation_client/models/uk_constituency_breakdown_by_constituency.py,sha256=Jap6gC8qT3F-RFGzM2cpMONSKHW9OSyfyMAR7bAseOg,2539
53
+ policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values.py,sha256=Ti5u0a7m2PeWGaaqt0VZITDucBcowFe-4rD3-TVBjYw,2951
54
+ policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_by_constituency.py,sha256=7Yg4h6pbWd97YcOsBVdj5pvDWagFnO4WDEOiKadNMM0,2111
55
+ policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_outcomes_by_region.py,sha256=i2VsX-R7Ht-_yc2OMir5CX-RKnyTDYG-qTUOwH1281Y,2462
56
+ policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_outcomes_by_region_additional_property.py,sha256=BTDlIEztRdT65IEFJsra3ekDobDoimHOvxjKrxP3RqA,1540
57
+ policyengine_api_simulation_client/models/validation_error.py,sha256=n8d_ZobQV26pm0KyDAKvIo93uOBhz2BH59jpJAKwoPY,2180
58
+ policyengine_api_simulation_client/models/wealth_decile_impact_with_values.py,sha256=UHYC3miGGuAHrodbiXjO8IyksA3y9y-nKWHRYlv46ro,2481
59
+ policyengine_api_simulation_client/models/wealth_decile_impact_with_values_average.py,sha256=sA3YchpGQW-yot24TT-SKkUDvWhl2-h6vl3BhumNikM,1374
60
+ policyengine_api_simulation_client/models/wealth_decile_impact_with_values_relative.py,sha256=mt4ScF_u2j0XYM0eFxflMKz-TK2UDADVtMeVHIcJsEw,1379
61
+ policyengine_api_simulation_client/py.typed,sha256=8ZJUsxZiuOy1oJeVhsTWQhTG_6pTVHVXk5hJL79ebTk,25
62
+ policyengine_api_simulation_client/types.py,sha256=0We4NPvhIYASRpQ3le41nmJeEAVm42-2VKdzlJ4Ogok,1343
63
+ policyengine_api_simulation_client-0.20251210.56.dist-info/METADATA,sha256=nuqNkYCbroXOay5J-YXgLVVKqKmgbMlOw7HN62mzzRY,5893
64
+ policyengine_api_simulation_client-0.20251210.56.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
65
+ policyengine_api_simulation_client-0.20251210.56.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.2.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any