oarepo-runtime 2.0.0.dev6__py3-none-any.whl → 2.0.0.dev7__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.
@@ -19,6 +19,6 @@ from .api import Model
19
19
  from .ext import OARepoRuntime
20
20
  from .proxies import current_runtime
21
21
 
22
- __version__ = "2.0.0dev6"
22
+ __version__ = "2.0.0dev7"
23
23
 
24
24
  __all__ = ("Model", "OARepoRuntime", "__version__", "current_runtime")
@@ -0,0 +1,16 @@
1
+ #
2
+ # Copyright (c) 2025 CESNET z.s.p.o.
3
+ #
4
+ # This file is a part of oarepo-runtime (see http://github.com/oarepo/oarepo-runtime).
5
+ #
6
+ # oarepo-runtime is free software; you can redistribute it and/or modify it
7
+ # under the terms of the MIT License; see LICENSE file for more details.
8
+ #
9
+
10
+ """Extensions for RDM API resources."""
11
+
12
+ from __future__ import annotations
13
+
14
+ from .config import exports_to_response_handlers
15
+
16
+ __all__ = ("exports_to_response_handlers",)
@@ -0,0 +1,35 @@
1
+ #
2
+ # Copyright (c) 2025 CESNET z.s.p.o.
3
+ #
4
+ # This file is a part of oarepo-runtime (see http://github.com/oarepo/oarepo-runtime).
5
+ #
6
+ # oarepo-runtime is free software; you can redistribute it and/or modify it
7
+ # under the terms of the MIT License; see LICENSE file for more details.
8
+ #
9
+
10
+ """Extensions for RDM API resources."""
11
+
12
+ from __future__ import annotations
13
+
14
+ from typing import TYPE_CHECKING
15
+
16
+ from flask_resources.responses import ResponseHandler
17
+ from invenio_records_resources.resources.records.headers import etag_headers
18
+
19
+ if TYPE_CHECKING:
20
+ from collections.abc import Iterable
21
+
22
+ from oarepo_runtime.api import Export
23
+
24
+
25
+ def exports_to_response_handlers(
26
+ exports: Iterable[Export],
27
+ ) -> dict[str, ResponseHandler]:
28
+ """Convert exports to a dictionary of mimetype -> response handlers."""
29
+ return {
30
+ export.mimetype: ResponseHandler(
31
+ serializer=export.serializer,
32
+ headers=etag_headers,
33
+ )
34
+ for export in exports
35
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oarepo-runtime
3
- Version: 2.0.0.dev6
3
+ Version: 2.0.0.dev7
4
4
  Summary: A set of runtime extensions of Invenio repository
5
5
  Project-URL: Homepage, https://github.com/oarepo/oarepo-runtime
6
6
  License-Expression: MIT
@@ -1,4 +1,4 @@
1
- oarepo_runtime/__init__.py,sha256=_r7NviuUWi_2RA8KG16wk_5RY4ZxJ_BZYkf6_8K0MUc,685
1
+ oarepo_runtime/__init__.py,sha256=CGFO3XA-tFYr8CSLP4u5IjWduSSXZgsKkmBat_FDDig,685
2
2
  oarepo_runtime/api.py,sha256=P_y8b5AFES0ssv6x_GDg4MtD6TIfoNsOAVMMoiRM560,10330
3
3
  oarepo_runtime/config.py,sha256=RUEPFn_5bKp9Wb0OY-Fb3VK30m35vF5IsLjYaQHhP3g,3838
4
4
  oarepo_runtime/ext.py,sha256=AMb5pMnCSbqIpPyP99YUKlf9vopz_b2ZW-RnvfsEVlk,3254
@@ -12,6 +12,8 @@ oarepo_runtime/records/pid_providers.py,sha256=pVXVeYmAsXy-IEdM2zHZ7UWkAnzXg1gts
12
12
  oarepo_runtime/records/systemfields/__init__.py,sha256=g-u408qyNnsbUTpDtVVwlcyiJaO68GTjDN0W9rXs9pk,524
13
13
  oarepo_runtime/records/systemfields/mapping.py,sha256=66OQavKewJEUMkghymOxvskIO0LUSP2E-MbHryeT5Nk,1968
14
14
  oarepo_runtime/records/systemfields/publication_status.py,sha256=1g3VXNPh0FsiPCpe-7ZuaMEF4x8ffrDrt37Rqnjp0ng,2027
15
+ oarepo_runtime/resources/__init__.py,sha256=voynQULXoOEviADkbOpekMphZPTAz4IOTg5BF9xPwTM,453
16
+ oarepo_runtime/resources/config.py,sha256=hJewyZ2FlEm4TtYnQS9JsnKnA6hhtSbvo1PC24-7f7Y,980
15
17
  oarepo_runtime/services/__init__.py,sha256=OGtBgEeaDTyk2RPDNXuKbU9_7egFBZr42SM0gN5FrF4,341
16
18
  oarepo_runtime/services/results.py,sha256=fk-Enx_LwZLbw81yZ7CXVTku86vd3_fjprnb8l5sFHk,6657
17
19
  oarepo_runtime/services/config/__init__.py,sha256=SX1kfIGk8HkohdLQrNpRQUTltksEyDcCa-kFXxrX4e8,711
@@ -25,8 +27,8 @@ oarepo_runtime/services/records/mapping.py,sha256=y3oeToKEnaRYpMV3q2-2cXNzyzyL3X
25
27
  oarepo_runtime/services/schema/__init__.py,sha256=jgAPI_uKC6Ug4KQWnwQVg3-aNaw-eHja323AUFo5ELo,351
26
28
  oarepo_runtime/services/schema/i18n.py,sha256=9D1zOQaPKAnYzejB0vO-m2BJYnam0N0Lrq4jID7twfE,3174
27
29
  oarepo_runtime/services/schema/i18n_ui.py,sha256=DbusphhGDeaobTt4nuwNgKZ6Houlu4Sv3SuMGkdjRRY,3582
28
- oarepo_runtime-2.0.0.dev6.dist-info/METADATA,sha256=C8GjGM-BySVIrhvdW5mon3uYAq0YcP6WNqdKC0-rFIg,4494
29
- oarepo_runtime-2.0.0.dev6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
30
- oarepo_runtime-2.0.0.dev6.dist-info/entry_points.txt,sha256=7HqK5jumIgDVJa7ifjPKizginfIm5_R_qUVKPf_Yq-c,145
31
- oarepo_runtime-2.0.0.dev6.dist-info/licenses/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
32
- oarepo_runtime-2.0.0.dev6.dist-info/RECORD,,
30
+ oarepo_runtime-2.0.0.dev7.dist-info/METADATA,sha256=KTuBGDB-RrBrR81Q_aXnm0wecIABTU3S0EBsqsdtmKs,4494
31
+ oarepo_runtime-2.0.0.dev7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
32
+ oarepo_runtime-2.0.0.dev7.dist-info/entry_points.txt,sha256=7HqK5jumIgDVJa7ifjPKizginfIm5_R_qUVKPf_Yq-c,145
33
+ oarepo_runtime-2.0.0.dev7.dist-info/licenses/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
34
+ oarepo_runtime-2.0.0.dev7.dist-info/RECORD,,