edri 2025.12.1rc1__py3-none-any.whl → 2025.12.1rc2__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.
@@ -17,7 +17,7 @@ from typing import Optional, Type, Tuple, Callable, Union, TypeVar, Never, get_a
17
17
  from edri.abstract.manager.worker import Worker
18
18
  from edri.abstract.worker import WorkerProcess
19
19
  from edri.api.dataclass.api_event import api_events
20
- from edri.config.setting import API_CACHE_CONTROL
20
+ from edri.config.setting import API_CACHE_CONTROL, API_CACHE_HEADERS
21
21
  from edri.dataclass.directive.http import NotModifiedResponseDirective, HeaderResponseDirective
22
22
  from edri.dataclass.event import Event
23
23
  from edri.dataclass.health_checker import Status
@@ -127,6 +127,9 @@ class ManagerBase(ABC, Process, metaclass=ManagerBaseMeta):
127
127
  self._store_get: Optional[Callable] = None
128
128
  self._exceptions: list[tuple[str, dict, Exception, str]] = []
129
129
  self._cache: Cache
130
+ self._cache_vary = "Accept,Accept-Encoding"
131
+ if API_CACHE_HEADERS:
132
+ self._cache_vary += f",{API_CACHE_HEADERS}"
130
133
 
131
134
  def _subscribe(self) -> None:
132
135
  """
@@ -645,6 +648,7 @@ class ManagerBase(ABC, Process, metaclass=ManagerBaseMeta):
645
648
  else:
646
649
  event.response.add_directive(HeaderResponseDirective(name="ETag", value=etag))
647
650
  event.response.add_directive(HeaderResponseDirective(name="Cache-Control", value=API_CACHE_CONTROL))
651
+ event.response.add_directive(HeaderResponseDirective(name="Vary", value=self._cache_vary))
648
652
  self.router_queue.put(event)
649
653
 
650
654
  def get_pipes(self) -> set[Connection]:
edri/api/listener.py CHANGED
@@ -147,7 +147,7 @@ class Listener(Process):
147
147
  if isinstance(handler, HTMLHandler):
148
148
  if await handler.response_assets(scope["path"]):
149
149
  return
150
- self.logger.debug("Unknown url %s", scope["path"])
150
+ self.logger.warning("Unknown url %s", scope["path"])
151
151
  await handler.response_error(HTTPStatus.NOT_FOUND, {
152
152
  "reasons": [{
153
153
  "status_code": HTTPStatus.NOT_FOUND,
edri/config/setting.py CHANGED
@@ -15,11 +15,18 @@ ENVIRONMENT: Literal["development", "production"] = "production" if getenv("ENVI
15
15
 
16
16
  HEALTH_CHECK_TIMEOUT = int(getenv("EDRI_HEALTH_CHECK_TIMEOUT", 10))
17
17
  HEALTH_CHECK_FAILURE_LIMIT = int(getenv("EDRI_HEALTH_CHECK_FAILURE_LIMIT", 3))
18
+
19
+ CORS_ORIGINS = getenv("EDRI_CORS_ORIGINS")
20
+ CORS_HEADERS = getenv("EDRI_CORS_HEADERS")
21
+ CORS_CREDENTIALS = bool(getenv("EDRI_CORS_CREDENTIALS", False))
22
+ CORS_MAX_AGE = getenv("EDRI_CORS_MAX_AGE", None)
23
+
18
24
  TIMEZONE = timezone(getenv("EDRI_TIMEZONE", "UTC"))
19
25
  API_RESPONSE_TIMEOUT = int(getenv("EDRI_API_RESPONSE_TIMEOUT", 60))
20
26
  API_RESPONSE_WRAPPED = getenv_bool("EDRI_API_RESPONSE_WRAPPED", True)
21
27
  API_RESPONSE_TIMING = getenv_bool("EDRI_API_RESPONSE_TIMING", ENVIRONMENT == 'development')
22
28
  API_CACHE_CONTROL = getenv("EDRI_API_CACHE_CONTROL", "max-age=0, must-revalidate")
29
+ API_CACHE_HEADERS = getenv("EDRI_API_CACHE_HEADERS", CORS_HEADERS)
23
30
 
24
31
  SWITCH_KEY_LENGTH = int(getenv("EDRI_SWITCH_KEY_LENGTH ", 8))
25
32
  SWITCH_HOST = getenv("EDRI_SWITCH_HOST", "localhost")
@@ -41,7 +48,4 @@ ASSETS_PATH = getenv("EDRI_ASSETS_PATH", "assets")
41
48
  MAX_BODY_SIZE = int(getenv("EDRI_MAX_BODY_SIZE", 4096 * 1024))
42
49
  CHUNK_SIZE = int(getenv("EDRI_CHUNK_SIZE", 256 * 1024))
43
50
 
44
- CORS_ORIGINS = getenv("EDRI_CORS_ORIGINS")
45
- CORS_HEADERS = getenv("EDRI_CORS_HEADERS")
46
- CORS_CREDENTIALS = bool(getenv("EDRI_CORS_CREDENTIALS", False))
47
- CORS_MAX_AGE = getenv("EDRI_CORS_MAX_AGE", None)
51
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: edri
3
- Version: 2025.12.1rc1
3
+ Version: 2025.12.1rc2
4
4
  Summary: Event Driven Routing Infrastructure
5
5
  Author: Marek Olšan
6
6
  Author-email: marek.olsan@gmail.com
@@ -1,7 +1,7 @@
1
1
  edri/__init__.py,sha256=bBVs4ynkUzMRudKZyuRScpPmUZTIL1LDfIytZ_L7oKE,6257
2
2
  edri/abstract/__init__.py,sha256=C6ew041GNVcQlfkE77kHeZ9Ts1rIaWRqqh3bKz7Kb1E,488
3
3
  edri/abstract/manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- edri/abstract/manager/manager_base.py,sha256=jzz1C9CoK5g0eyMSFynOSyTdu9LFuU_WdmV0Q2uraUU,42097
4
+ edri/abstract/manager/manager_base.py,sha256=mguHncpNnx-5RSAPdkzzl74NpOghpl2pI76H0biyZEo,42373
5
5
  edri/abstract/manager/manager_priority_base.py,sha256=1bUGsIr6MUrCNsJsLNF_tYaiFDX5t8vK2794vdZumQo,8219
6
6
  edri/abstract/manager/worker.py,sha256=xMJMDQtcH-j8s37cUoMsF_ZrWS4elbU7vnjdKfAv0gM,403
7
7
  edri/abstract/worker/__init__.py,sha256=qcCF2MnReil9G9ojrr7I3hjMks-1tsap4yrYH5Vr07Q,164
@@ -10,7 +10,7 @@ edri/abstract/worker/worker_process.py,sha256=QiNxOuwkMds0sV2MBLyp7bjrovm5xColC7
10
10
  edri/abstract/worker/worker_thread.py,sha256=xoMPuDn-hAkWk6kFY3Xf8mxOVP__5t7-x7f-b396-8M,2176
11
11
  edri/api/__init__.py,sha256=ZDxCpHKFGajJ1RwDpV7CzxLDUaKpozJRfOCv1OPv5ZY,142
12
12
  edri/api/broker.py,sha256=I3z_bKbcTDnKXk82yteGEQmuxpqHgp5KrhQaJmk3US0,37258
13
- edri/api/listener.py,sha256=B2RgqQmCkcJOYWtTlYkyb2H7xCM233iNfsa5LG4qZZ0,20401
13
+ edri/api/listener.py,sha256=8ffX8ntJ5XbHAqT5hM38teMRsd1cBjcJ7PJAMa4Ez7c,20403
14
14
  edri/api/middleware.py,sha256=6_x55swthVDczT-fu_1ufY1cDsHTZ04jMx6J6xfjbsM,5483
15
15
  edri/api/dataclass/__init__.py,sha256=8Y-zcaJtzMdALnNG7M9jsCaB1qAJKM8Ld3h9MDajYjA,292
16
16
  edri/api/dataclass/api_event.py,sha256=08edshexI9FxdebPIgTQMSQ4fEtGpAa3K_VYCmN1jFs,6587
@@ -32,7 +32,7 @@ edri/api/static_pages/status_400.j2,sha256=ArSvsNy9GG-Gbqt6fbRSqETmGV4aTJa3Zgwwt
32
32
  edri/api/static_pages/status_500.j2,sha256=39T6VeU_7m-6-RJyVsS48dD56Hp3ZcOeVC397T8GlsY,1468
33
33
  edri/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  edri/config/constant.py,sha256=5angk0yL3LlMWShzt0D7TflK5d2yLj2HDWoVqCqSLbY,783
35
- edri/config/setting.py,sha256=f4mS9-KmWTlOgFYt5N7E509jM_gRqJ0MlOwS_C_pPPI,1995
35
+ edri/config/setting.py,sha256=kzii_wmx4C8-uE_TNfBvRlJMkpJrvVLXvZam-2pm3eE,2065
36
36
  edri/dataclass/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  edri/dataclass/event.py,sha256=3XwbS_8Nst0V5D6vQ0FYhrX5rx6KfLGd3-9ba71xUMQ,9866
38
38
  edri/dataclass/health_checker.py,sha256=62H5wGUtOhql3acPwFtMhpGKPUTmFwWQ4hlqIn6tjfo,1784
@@ -157,7 +157,7 @@ tests/utility/test_validation.py,sha256=wZcXjLrj3JheVLKnYKkkYfyC8CCpHVAw9Jn_uDnu
157
157
  tests/utility/manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
158
158
  tests/utility/manager/test_scheduler.py,sha256=sROffYvSOaWsYQxQGTy6l9Mn_qeNPRmJoXLVPKU3XNY,9153
159
159
  tests/utility/manager/test_store.py,sha256=xlo1JUsPLIhPJyQn7AXldAgWDo_O8ba2ns25TEaaGdQ,2821
160
- edri-2025.12.1rc1.dist-info/METADATA,sha256=7cDoLUgm5GGkhfQcpY1FLw14TpnrQmPC1wNk-YGeugU,8374
161
- edri-2025.12.1rc1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
162
- edri-2025.12.1rc1.dist-info/top_level.txt,sha256=himES6JgPlx4Zt8aDrQEj2fxAd7IDD6MBOsiNZkzKHQ,11
163
- edri-2025.12.1rc1.dist-info/RECORD,,
160
+ edri-2025.12.1rc2.dist-info/METADATA,sha256=NeoeP68DCOS92xqVLi73utoinBQmH0Abhy9lcOW-bf4,8374
161
+ edri-2025.12.1rc2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
162
+ edri-2025.12.1rc2.dist-info/top_level.txt,sha256=himES6JgPlx4Zt8aDrQEj2fxAd7IDD6MBOsiNZkzKHQ,11
163
+ edri-2025.12.1rc2.dist-info/RECORD,,