oarepo-runtime 2.0.0.dev6__tar.gz → 2.0.0.dev7__tar.gz

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 (34) hide show
  1. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/PKG-INFO +1 -1
  2. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/__init__.py +1 -1
  3. oarepo_runtime-2.0.0.dev7/oarepo_runtime/resources/__init__.py +16 -0
  4. oarepo_runtime-2.0.0.dev7/oarepo_runtime/resources/config.py +35 -0
  5. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/.gitignore +0 -0
  6. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/LICENSE +0 -0
  7. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/README.md +0 -0
  8. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/api.py +0 -0
  9. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/cli/__init__.py +0 -0
  10. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/cli/search.py +0 -0
  11. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/config.py +0 -0
  12. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/ext.py +0 -0
  13. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/proxies.py +0 -0
  14. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/records/__init__.py +0 -0
  15. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/records/drafts.py +0 -0
  16. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/records/mapping.py +0 -0
  17. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/records/pid_providers.py +0 -0
  18. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/records/systemfields/__init__.py +0 -0
  19. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/records/systemfields/mapping.py +0 -0
  20. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/records/systemfields/publication_status.py +0 -0
  21. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/services/__init__.py +0 -0
  22. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/services/config/__init__.py +0 -0
  23. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/services/config/link_conditions.py +0 -0
  24. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/services/config/permissions.py +0 -0
  25. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/services/facets/__init__.py +0 -0
  26. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/services/facets/params.py +0 -0
  27. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/services/records/__init__.py +0 -0
  28. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/services/records/links.py +0 -0
  29. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/services/records/mapping.py +0 -0
  30. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/services/results.py +0 -0
  31. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/services/schema/__init__.py +0 -0
  32. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/services/schema/i18n.py +0 -0
  33. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/oarepo_runtime/services/schema/i18n_ui.py +0 -0
  34. {oarepo_runtime-2.0.0.dev6 → oarepo_runtime-2.0.0.dev7}/pyproject.toml +0 -0
@@ -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
@@ -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
+ }