openepd 7.9.0__py3-none-any.whl → 7.10.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 +1 -1
- openepd/api/epd/sync_api.py +6 -3
- openepd/model/epd.py +1 -0
- {openepd-7.9.0.dist-info → openepd-7.10.0.dist-info}/METADATA +1 -1
- {openepd-7.9.0.dist-info → openepd-7.10.0.dist-info}/RECORD +7 -7
- {openepd-7.9.0.dist-info → openepd-7.10.0.dist-info}/LICENSE +0 -0
- {openepd-7.9.0.dist-info → openepd-7.10.0.dist-info}/WHEEL +0 -0
openepd/__version__.py
CHANGED
openepd/api/epd/sync_api.py
CHANGED
@@ -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
|
-
:
|
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
|
-
|
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.model_validate(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
@@ -1,5 +1,5 @@
|
|
1
1
|
openepd/__init__.py,sha256=9THJcV3LT7JDBOMz1px-QFf_sdJ0LOqJ5dmA9Dvvtd4,620
|
2
|
-
openepd/__version__.py,sha256=
|
2
|
+
openepd/__version__.py,sha256=A_q9rcTFYq13WDk7bIUKJZzeX5llV-alCEOuzu5ADlg,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=mjTT8eGtfj6Fgp-wcs0cCWA7DJo1KL_iQ75rgKkaY3c,8037
|
@@ -17,7 +17,7 @@ openepd/api/dto/mf.py,sha256=3pobE0iihSBqH0rZgWP95_IlQzSJBqKZrYYufWDobUo,2000
|
|
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=rcRUKUj-N885K6tjQnPGiFVDhc8yd9nUJKnkhIwgOtM,5084
|
20
|
-
openepd/api/epd/sync_api.py,sha256=
|
20
|
+
openepd/api/epd/sync_api.py,sha256=YAnHm_rJJHKagyvpKTiErcR0TpKlJ7Ul2L0umCH6eo0,7704
|
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=40D4X3Tt0kbN9AAc6DM-LWz_Obsh0zEG07mgQk1gd-k,3177
|
@@ -45,7 +45,7 @@ openepd/model/base.py,sha256=4D8BaSoNeY8RZfjkmJOSyfg0B34dKzM76lZbQT9AIXg,13622
|
|
45
45
|
openepd/model/category.py,sha256=iyzzAsiVwW4zJ61oYsm9Sy-sEBA71-aMFXcJP1Y-dPI,1734
|
46
46
|
openepd/model/common.py,sha256=a4FFM5moxEyOTAQuf0eZTbWb3vz2deGh37j1nLg3f0k,15002
|
47
47
|
openepd/model/declaration.py,sha256=n55PqeIsBGT4UGHjGyb92txuoPB_S0eZ3lcmUAuS4NQ,14843
|
48
|
-
openepd/model/epd.py,sha256=
|
48
|
+
openepd/model/epd.py,sha256=cS3ZT_72v0gFcEhuDQrF_Zs8-Cob3FjyipUbBpc-xFM,12760
|
49
49
|
openepd/model/factory.py,sha256=UWSGpfCr3GiMTP4rzBkwqxzbXB6GKZ_5Okb1Dqa_4aA,2701
|
50
50
|
openepd/model/generic_estimate.py,sha256=_R18Uz-hvxtSBl53D0_OkwVCWvoa2nIDjBdec6vEPDE,4304
|
51
51
|
openepd/model/geography.py,sha256=Jx7NIDdk_sIvwyh-7YxnIjAwIHW2HCQK7UtFGM2xKtw,42095
|
@@ -154,7 +154,7 @@ openepd/utils/mapping/__init__.py,sha256=9THJcV3LT7JDBOMz1px-QFf_sdJ0LOqJ5dmA9Dv
|
|
154
154
|
openepd/utils/mapping/common.py,sha256=hxfN-WW2WLwE_agQzf_mhvz6OHq5WWlr24uZ1S81k4Y,8426
|
155
155
|
openepd/utils/mapping/geography.py,sha256=1_-dvLk11Hqn-K58yUI5pQ5X5gsnJPFlFT7JK2Rdoeg,2396
|
156
156
|
openepd/utils/markdown.py,sha256=RQmudPhb4QU1I4-S-VV2WFbzzq2Po09kbpjjKbwkA9E,1830
|
157
|
-
openepd-7.
|
158
|
-
openepd-7.
|
159
|
-
openepd-7.
|
160
|
-
openepd-7.
|
157
|
+
openepd-7.10.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
158
|
+
openepd-7.10.0.dist-info/METADATA,sha256=9Pw7b7swT8988umoBB0OJAN2YCxYmzuKRm_2e-aYb-w,9811
|
159
|
+
openepd-7.10.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
160
|
+
openepd-7.10.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|