processcube-etw-library 2026.1.21.174504b0__tar.gz → 2026.1.22.112808b0__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 (27) hide show
  1. {processcube_etw_library-2026.1.21.174504b0/src/processcube_etw_library.egg-info → processcube_etw_library-2026.1.22.112808b0}/PKG-INFO +1 -1
  2. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/__init__.py +6 -0
  3. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/create_external_task_client.py +5 -5
  4. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/etw_app.py +0 -3
  5. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/health/built_in.py +2 -2
  6. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/server_config.py +2 -2
  7. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/settings.py +7 -18
  8. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0/src/processcube_etw_library.egg-info}/PKG-INFO +1 -1
  9. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/.github/workflows/build_and_publish.yml +0 -0
  10. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/.gitignore +0 -0
  11. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/.python-version +0 -0
  12. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/README.md +0 -0
  13. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/pyproject.toml +0 -0
  14. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/setup.cfg +0 -0
  15. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/health/__init__.py +0 -0
  16. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/health/check.py +0 -0
  17. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/health/handlers.py +0 -0
  18. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/health/models.py +0 -0
  19. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/health/registry.py +0 -0
  20. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/health/routes.py +0 -0
  21. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/identity_provider.py +0 -0
  22. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library/typed_handler.py +0 -0
  23. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library.egg-info/SOURCES.txt +0 -0
  24. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library.egg-info/dependency_links.txt +0 -0
  25. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library.egg-info/requires.txt +0 -0
  26. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/src/processcube_etw_library.egg-info/top_level.txt +0 -0
  27. {processcube_etw_library-2026.1.21.174504b0 → processcube_etw_library-2026.1.22.112808b0}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: processcube-etw-library
3
- Version: 2026.1.21.174504b0
3
+ Version: 2026.1.22.112808b0
4
4
  Summary: A library to create ETW apps with the ProcessCube platform.
5
5
  Author-email: Jeremy Hill <jeremy.hill@profection.de>
6
6
  License: MIT
@@ -1,3 +1,7 @@
1
+ # Prevent nest_asyncio from patching asyncio.run() in processcube_client - it breaks uvicorn's loop_factory
2
+ import nest_asyncio
3
+ nest_asyncio.apply = lambda *args, **kwargs: None
4
+
1
5
  from .health import (
2
6
  create_url_health_check,
3
7
  HealthCheck,
@@ -7,6 +11,7 @@ from .health import (
7
11
  LivezResponse,
8
12
  )
9
13
  from .etw_app import new_external_task_worker_app
14
+ from .settings import load_settings, load_settings
10
15
 
11
16
  __all__ = [
12
17
  "create_url_health_check",
@@ -16,4 +21,5 @@ __all__ = [
16
21
  "HealthConditionInfo",
17
22
  "LivezResponse",
18
23
  "new_external_task_worker_app",
24
+ "load_settings",
19
25
  ]
@@ -1,15 +1,15 @@
1
- # Prevent nest_asyncio from patching asyncio.run() in processcube_client - it breaks uvicorn's loop_factory
2
- import nest_asyncio
3
- nest_asyncio.apply = lambda *args, **kwargs: None
1
+ # # Prevent nest_asyncio from patching asyncio.run() in processcube_client - it breaks uvicorn's loop_factory
2
+ # import nest_asyncio
3
+ # nest_asyncio.apply = lambda *args, **kwargs: None
4
4
 
5
5
  from processcube_client.external_task import ExternalTaskClient
6
6
 
7
7
  from .identity_provider import IdentityProvider
8
- from .settings import get_settings
8
+ from .settings import load_settings
9
9
 
10
10
 
11
11
  def create_external_task_client() -> ExternalTaskClient:
12
- settings = get_settings()
12
+ settings = load_settings()
13
13
  authority_url = settings.processcube_authority_url
14
14
  engine_url = settings.processcube_engine_url
15
15
  client_name = settings.processcube_etw_client_id
@@ -15,7 +15,6 @@ from .health import (
15
15
  from .create_external_task_client import create_external_task_client
16
16
  from .server_config import get_server_config
17
17
  from .typed_handler import create_typed_handler_wrapper
18
- from .settings import get_settings
19
18
  from processcube_client.external_task import ExternalTaskClient
20
19
 
21
20
 
@@ -92,8 +91,6 @@ class ExternalTaskWorkerApp:
92
91
  def new_external_task_worker_app(
93
92
  built_in_health_checks: bool = True,
94
93
  ) -> ExternalTaskWorkerApp:
95
- settings = get_settings()
96
-
97
94
  external_task_client = create_external_task_client()
98
95
 
99
96
  return ExternalTaskWorkerApp(
@@ -1,10 +1,10 @@
1
- from ..settings import get_settings
1
+ from ..settings import load_settings
2
2
  from .check import HealthCheck, create_url_health_check
3
3
  from .registry import HealthCheckRegistry
4
4
 
5
5
 
6
6
  def add_built_in_health_checks(registry: HealthCheckRegistry) -> None:
7
- settings = get_settings()
7
+ settings = load_settings()
8
8
 
9
9
  engine_url = (
10
10
  settings.processcube_engine_url.strip("/")
@@ -1,6 +1,6 @@
1
1
  from typing import TypedDict
2
2
 
3
- from .settings import get_settings
3
+ from .settings import load_settings
4
4
 
5
5
 
6
6
  class ServerConfig(TypedDict, total=False):
@@ -12,7 +12,7 @@ class ServerConfig(TypedDict, total=False):
12
12
 
13
13
 
14
14
  def get_server_config() -> ServerConfig:
15
- settings = get_settings()
15
+ settings = load_settings()
16
16
 
17
17
  if settings.environment == "production":
18
18
  return ServerConfig(
@@ -44,8 +44,8 @@ class ETWSettings(BaseSettings):
44
44
  class MySettings(ETWSettings):
45
45
  my_custom_var: str = Field(default="default_value")
46
46
 
47
- # Initialize with custom settings class
48
- init_settings(MySettings)
47
+ # Load with custom settings class
48
+ settings = load_settings(MySettings)
49
49
  """
50
50
 
51
51
  model_config = SettingsConfigDict(
@@ -89,29 +89,18 @@ class ETWSettings(BaseSettings):
89
89
  _settings: Optional[ETWSettings] = None
90
90
 
91
91
 
92
- def init_settings(settings_class: Type[T] = ETWSettings) -> T:
93
- """
94
- Initialize the global settings instance.
95
92
 
93
+ def load_settings(settings_class: Type[T] = ETWSettings) -> T:
94
+ """
96
95
  Call this with a custom settings class to extend the base settings:
97
96
 
98
97
  class MySettings(ETWSettings):
99
98
  my_var: str = Field(default="value")
100
99
 
101
- init_settings(MySettings)
100
+ settings = load_settings(MySettings)
102
101
  """
103
- global _settings
104
- _settings = settings_class()
105
- return _settings
106
-
107
102
 
108
- def get_settings() -> ETWSettings:
109
- """
110
- Get the global settings instance.
111
-
112
- If settings haven't been initialized, creates a default ETWSettings instance.
113
- """
114
103
  global _settings
115
104
  if _settings is None:
116
- _settings = ETWSettings()
117
- return _settings
105
+ _settings = settings_class()
106
+ return _settings # type: ignore
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: processcube-etw-library
3
- Version: 2026.1.21.174504b0
3
+ Version: 2026.1.22.112808b0
4
4
  Summary: A library to create ETW apps with the ProcessCube platform.
5
5
  Author-email: Jeremy Hill <jeremy.hill@profection.de>
6
6
  License: MIT