openepd 6.27.0__py3-none-any.whl → 6.28.0__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.
openepd/__version__.py CHANGED
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- VERSION = "6.27.0"
16
+ VERSION = "6.28.0"
@@ -13,6 +13,7 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
+ from collections.abc import Collection
16
17
  from typing import Literal, overload
17
18
 
18
19
  from requests import Response
@@ -27,15 +28,17 @@ from openepd.model.epd import Epd
27
28
  class EpdApi(BaseApiMethodGroup):
28
29
  """API methods for EPDs."""
29
30
 
30
- def get_by_openxpd_uuid(self, uuid: str) -> Epd:
31
+ def get_by_openxpd_uuid(self, uuid: str, *, fields: Collection[str] | None = None) -> Epd:
31
32
  """
32
33
  Get EPD by OpenEPD UUID.
33
34
 
34
35
  :param uuid: OpenEPD UUID
35
- :return: EPD
36
+ :param fields: Optional collection of field names to include in the response
37
+ :return: EPD, Response, or tuple of EPD and Response depending on return_type
36
38
  :raise ObjectNotFound: if EPD is not found
37
39
  """
38
- content = self._client.do_request("get", f"/epds/{uuid}").json()
40
+ params = {"fields": ",".join(set(fields))} if fields else None
41
+ content = self._client.do_request("get", f"/epds/{uuid}", params=params).json()
39
42
  return Epd.parse_obj(content)
40
43
 
41
44
  def find_raw(self, omf: str, page_num: int = 1, page_size: int = 10) -> EpdSearchResponse:
openepd/model/epd.py CHANGED
@@ -139,6 +139,7 @@ class EpdPreviewV0(
139
139
  WithEpdDeveloperMixin,
140
140
  WithVerifierMixin,
141
141
  WithAltIdsMixin,
142
+ EpdRef,
142
143
  BaseDeclaration,
143
144
  title="EPD (Preview)",
144
145
  ):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: openepd
3
- Version: 6.27.0
3
+ Version: 6.28.0
4
4
  Summary: Python library to work with OpenEPD format
5
5
  License: Apache-2.0
6
6
  Author: C-Change Labs
@@ -1,5 +1,5 @@
1
1
  openepd/__init__.py,sha256=fhxfEyEurLvSfvQci-vb3njzl_lvhcLXiZrecCOaMU8,794
2
- openepd/__version__.py,sha256=HmKYYpYPt8TvWu0Hh2PXVwOFCv8fcayILaKwQX8TeWk,639
2
+ openepd/__version__.py,sha256=IUCrF_atrQRdHN3rso9BDfVu8IPQGot8f1SiPEB8L9Y,639
3
3
  openepd/api/__init__.py,sha256=9THJcV3LT7JDBOMz1px-QFf_sdJ0LOqJ5dmA9Dvvtd4,620
4
4
  openepd/api/average_dataset/__init__.py,sha256=9THJcV3LT7JDBOMz1px-QFf_sdJ0LOqJ5dmA9Dvvtd4,620
5
5
  openepd/api/average_dataset/generic_estimate_sync_api.py,sha256=_eZt_jGVL1a3p9cr-EF39Ve9Vl5sB8zwzTc_slnRL50,7975
@@ -17,7 +17,7 @@ openepd/api/dto/mf.py,sha256=59YvIrH5teHlpxINihxryFyCjs7jBZZuqYIO1K-daA8,1994
17
17
  openepd/api/dto/params.py,sha256=9THJcV3LT7JDBOMz1px-QFf_sdJ0LOqJ5dmA9Dvvtd4,620
18
18
  openepd/api/epd/__init__.py,sha256=9THJcV3LT7JDBOMz1px-QFf_sdJ0LOqJ5dmA9Dvvtd4,620
19
19
  openepd/api/epd/dto.py,sha256=MqhHjaNdtOc-KT2zNI88EB9-1d2a6CS2zzSus8HefBo,4874
20
- openepd/api/epd/sync_api.py,sha256=kBsx43q0cBm51hl3HVvzMIDrMMRi8NMyudPmHYd0qqU,7342
20
+ openepd/api/epd/sync_api.py,sha256=WD0Hq15oiEPyrE1uW8ta30sUjPcy7LMcPeo6uYfnilQ,7659
21
21
  openepd/api/errors.py,sha256=BgZeNfMNAKVPfhpuiVapCXNBSsXygAOWql-gy7m9j7E,2868
22
22
  openepd/api/org/__init__.py,sha256=9THJcV3LT7JDBOMz1px-QFf_sdJ0LOqJ5dmA9Dvvtd4,620
23
23
  openepd/api/org/sync_api.py,sha256=VzOrd3eB1xPVLyrKlZl3OwXIQ5nT3808sA6N7MNBu7w,3167
@@ -48,7 +48,7 @@ openepd/model/base.py,sha256=6rP6r-7NwKC6JLFB24v2w4Z-_f_w6ZSNLte5zyj5o70,9928
48
48
  openepd/model/category.py,sha256=reeOVRDuZPYU77EMwG0K5VjnK2H9yOGxT0PJXXqrjEk,1639
49
49
  openepd/model/common.py,sha256=WM6ankkeZazVzKwbn4s5FHwENMTIKWsgdRJkX7DYmpg,13875
50
50
  openepd/model/declaration.py,sha256=1WXTRlSRIUXTJJhL_e7BkoFyZ9gJKZH7c8pFVxihGFU,13980
51
- openepd/model/epd.py,sha256=_1P9-etXfLAVmg44pglnBUvoEyQ50odNBsUrv_OeS9M,12308
51
+ openepd/model/epd.py,sha256=SGAgEEAuvRGsIlgIUI60UqV1alhb5kouOvp8fAC0VPg,12320
52
52
  openepd/model/factory.py,sha256=UWSGpfCr3GiMTP4rzBkwqxzbXB6GKZ_5Okb1Dqa_4aA,2701
53
53
  openepd/model/generic_estimate.py,sha256=zLGTyf4Uzmp2C0m-J1ePWItSz2RGdZ0OiGPWC5nhKHk,3992
54
54
  openepd/model/geography.py,sha256=Jx7NIDdk_sIvwyh-7YxnIjAwIHW2HCQK7UtFGM2xKtw,42095
@@ -156,7 +156,7 @@ openepd/utils/__init__.py,sha256=9THJcV3LT7JDBOMz1px-QFf_sdJ0LOqJ5dmA9Dvvtd4,620
156
156
  openepd/utils/functional.py,sha256=sm7od2_UE-cNToezBlwFQ1TCUJub1tz6VykA1X8XH-I,1274
157
157
  openepd/utils/mapping/__init__.py,sha256=9THJcV3LT7JDBOMz1px-QFf_sdJ0LOqJ5dmA9Dvvtd4,620
158
158
  openepd/utils/mapping/common.py,sha256=WphCzwQQlzX11tUk88Ubyq3QPBLvH0tBPSIuH0kmiug,7339
159
- openepd-6.27.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
160
- openepd-6.27.0.dist-info/METADATA,sha256=1qocBkldct5oXEPyBq3C6KN9M9OErubIul8X68L_M1U,9827
161
- openepd-6.27.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
162
- openepd-6.27.0.dist-info/RECORD,,
159
+ openepd-6.28.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
160
+ openepd-6.28.0.dist-info/METADATA,sha256=Csp45UMu54luUAHWZ46DFe4gAYhvLt4m0J0lUikNfaY,9827
161
+ openepd-6.28.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
162
+ openepd-6.28.0.dist-info/RECORD,,