cwyodmodules 0.3.78__py3-none-any.whl → 0.3.80__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.
- cwyodmodules/mgmt_config.py +33 -26
- {cwyodmodules-0.3.78.dist-info → cwyodmodules-0.3.80.dist-info}/METADATA +2 -2
- {cwyodmodules-0.3.78.dist-info → cwyodmodules-0.3.80.dist-info}/RECORD +6 -6
- {cwyodmodules-0.3.78.dist-info → cwyodmodules-0.3.80.dist-info}/WHEEL +0 -0
- {cwyodmodules-0.3.78.dist-info → cwyodmodules-0.3.80.dist-info}/licenses/LICENSE +0 -0
- {cwyodmodules-0.3.78.dist-info → cwyodmodules-0.3.80.dist-info}/top_level.txt +0 -0
cwyodmodules/mgmt_config.py
CHANGED
@@ -71,28 +71,6 @@ from azpaddypy.mgmt.local_env_manager import create_local_env_manager
|
|
71
71
|
from azpaddypy.mgmt.logging import create_app_logger, create_function_logger
|
72
72
|
from azpaddypy.resources.keyvault import create_azure_keyvault
|
73
73
|
|
74
|
-
# =============================================================================
|
75
|
-
# SERVICE CONFIGURATION
|
76
|
-
# =============================================================================
|
77
|
-
|
78
|
-
def _get_service_configuration() -> tuple[str, str, str]:
|
79
|
-
"""Get service configuration from environment variables.
|
80
|
-
|
81
|
-
Returns:
|
82
|
-
A tuple containing (service_name, service_version, service_kind).
|
83
|
-
|
84
|
-
Note:
|
85
|
-
REFLECTION_KIND has commas replaced with hyphens for compatibility.
|
86
|
-
"""
|
87
|
-
reflection_name = os.getenv("REFLECTION_NAME")
|
88
|
-
reflection_kind = os.getenv("REFLECTION_KIND", "").replace(",", "-")
|
89
|
-
service_name = reflection_name or str(__name__)
|
90
|
-
service_version = os.getenv("SERVICE_VERSION", "1.0.0")
|
91
|
-
|
92
|
-
return service_name, service_version, reflection_kind
|
93
|
-
|
94
|
-
|
95
|
-
SERVICE_NAME, SERVICE_VERSION, REFLECTION_KIND = _get_service_configuration()
|
96
74
|
|
97
75
|
# =============================================================================
|
98
76
|
# DOCKER ENVIRONMENT DETECTION
|
@@ -159,9 +137,11 @@ def _get_local_settings() -> Dict[str, str]:
|
|
159
137
|
"input_queue_connection__queueServiceUri": "UseDevelopmentStorage=true",
|
160
138
|
"AzureWebJobsStorage__accountName": "UseDevelopmentStorage=true",
|
161
139
|
"AzureWebJobsStorage__blobServiceUri": "UseDevelopmentStorage=true",
|
140
|
+
"AZURE_CLIENT_ID": "aa73da4a-2888-4cb7-896e-5d51125f11f0",
|
141
|
+
"AZURE_TENANT_ID": "e5590d5d-336c-4cf5-b0ac-b79a598ec797",
|
142
|
+
"AZURE_CLIENT_SECRET": "IQ08Q~4uCfc4B~p2F95D2737GzYvvrtIjursFbCf"
|
162
143
|
}
|
163
144
|
|
164
|
-
|
165
145
|
# Initialize local environment manager
|
166
146
|
local_env_manager = create_local_env_manager(
|
167
147
|
file_path=".env",
|
@@ -171,6 +151,29 @@ local_env_manager = create_local_env_manager(
|
|
171
151
|
override_settings=True,
|
172
152
|
)
|
173
153
|
|
154
|
+
# =============================================================================
|
155
|
+
# SERVICE CONFIGURATION
|
156
|
+
# =============================================================================
|
157
|
+
|
158
|
+
def _get_service_configuration() -> tuple[str, str, str]:
|
159
|
+
"""Get service configuration from environment variables.
|
160
|
+
|
161
|
+
Returns:
|
162
|
+
A tuple containing (service_name, service_version, service_kind).
|
163
|
+
|
164
|
+
Note:
|
165
|
+
REFLECTION_KIND has commas replaced with hyphens for compatibility.
|
166
|
+
"""
|
167
|
+
reflection_name = os.getenv("REFLECTION_NAME")
|
168
|
+
reflection_kind = os.getenv("REFLECTION_KIND", "").replace(",", "-")
|
169
|
+
service_name = reflection_name or str(__name__)
|
170
|
+
service_version = os.getenv("SERVICE_VERSION", "1.0.0")
|
171
|
+
|
172
|
+
return service_name, service_version, reflection_kind
|
173
|
+
|
174
|
+
|
175
|
+
SERVICE_NAME, SERVICE_VERSION, REFLECTION_KIND = _get_service_configuration()
|
176
|
+
|
174
177
|
# =============================================================================
|
175
178
|
# LOGGING CONFIGURATION
|
176
179
|
# =============================================================================
|
@@ -183,6 +186,8 @@ def _get_logging_configuration() -> tuple[bool, Optional[str], Dict[str, Dict[st
|
|
183
186
|
"""
|
184
187
|
console_enabled = os.getenv("LOGGER_ENABLE_CONSOLE", "true").lower() == "true"
|
185
188
|
connection_string = os.getenv("APPLICATIONINSIGHTS_CONNECTION_STRING")
|
189
|
+
log_level = os.getenv("LOGGER_LOG_LEVEL", "INFO")
|
190
|
+
enable_console_logging = os.getenv("LOGGER_ENABLE_CONSOLE", "true").lower() == "true"
|
186
191
|
|
187
192
|
instrumentation_options = {
|
188
193
|
"azure_sdk": {"enabled": True},
|
@@ -195,10 +200,10 @@ def _get_logging_configuration() -> tuple[bool, Optional[str], Dict[str, Dict[st
|
|
195
200
|
"urllib3": {"enabled": True},
|
196
201
|
}
|
197
202
|
|
198
|
-
return console_enabled, connection_string, instrumentation_options
|
203
|
+
return console_enabled, connection_string, instrumentation_options, log_level
|
199
204
|
|
200
205
|
|
201
|
-
LOGGER_ENABLE_CONSOLE, LOGGER_CONNECTION_STRING, LOGGER_INSTRUMENTATION_OPTIONS = _get_logging_configuration()
|
206
|
+
LOGGER_ENABLE_CONSOLE, LOGGER_CONNECTION_STRING, LOGGER_INSTRUMENTATION_OPTIONS, LOGGER_LOG_LEVEL = _get_logging_configuration()
|
202
207
|
|
203
208
|
# =============================================================================
|
204
209
|
# IDENTITY CONFIGURATION
|
@@ -272,7 +277,8 @@ def _create_logger():
|
|
272
277
|
function_name=REFLECTION_KIND,
|
273
278
|
service_version=SERVICE_VERSION,
|
274
279
|
connection_string=LOGGER_CONNECTION_STRING,
|
275
|
-
|
280
|
+
log_level=LOGGER_LOG_LEVEL,
|
281
|
+
instrumentation_options=LOGGER_INSTRUMENTATION_OPTIONS,
|
276
282
|
)
|
277
283
|
logger_instance.info(
|
278
284
|
f"Function logger initialized: {REFLECTION_KIND} {SERVICE_NAME}",
|
@@ -283,6 +289,7 @@ def _create_logger():
|
|
283
289
|
service_name=SERVICE_NAME,
|
284
290
|
service_version=SERVICE_VERSION,
|
285
291
|
connection_string=LOGGER_CONNECTION_STRING,
|
292
|
+
log_level=LOGGER_LOG_LEVEL,
|
286
293
|
enable_console_logging=LOGGER_ENABLE_CONSOLE,
|
287
294
|
instrumentation_options=LOGGER_INSTRUMENTATION_OPTIONS,
|
288
295
|
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: cwyodmodules
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.80
|
4
4
|
Summary: Add your description here
|
5
5
|
Author-email: Patrik <patrikhartl@gmail.com>
|
6
6
|
Classifier: Operating System :: OS Independent
|
@@ -40,7 +40,7 @@ Requires-Dist: azure-search-documents==11.6.0b4
|
|
40
40
|
Requires-Dist: semantic-kernel==1.3.0
|
41
41
|
Requires-Dist: pydantic==2.7.4
|
42
42
|
Requires-Dist: pandas>=2.2.3
|
43
|
-
Requires-Dist: azpaddypy>=0.5.
|
43
|
+
Requires-Dist: azpaddypy>=0.5.9
|
44
44
|
Dynamic: license-file
|
45
45
|
|
46
46
|
# paddypy
|
@@ -1,5 +1,5 @@
|
|
1
1
|
cwyodmodules/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
2
|
-
cwyodmodules/mgmt_config.py,sha256=
|
2
|
+
cwyodmodules/mgmt_config.py,sha256=8QtOFn_2xmuuUuJhVXHd1Q488Yh3Fe58AesLBxa0Cfg,17257
|
3
3
|
cwyodmodules/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
cwyodmodules/api/chat_history.py,sha256=bVXFmhTHIfEiHv_nBrfizO-cQRHhKgrdcZ07OD1b0Tw,20683
|
5
5
|
cwyodmodules/batch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -109,8 +109,8 @@ cwyodmodules/graphrag/query/generate.py,sha256=BZiB6iw7PkIovw-CyYFogMHnDxK0Qu_4u
|
|
109
109
|
cwyodmodules/graphrag/query/graph_search.py,sha256=95h3ecSWx4864XgKABtG0fh3Nk8HkqJVzoCrO8daJ-Y,7724
|
110
110
|
cwyodmodules/graphrag/query/types.py,sha256=1Iq1dp4I4a56_cuFjOZ0NTgd0A2_MpVFznp_czgt6cI,617
|
111
111
|
cwyodmodules/graphrag/query/vector_search.py,sha256=9Gwu9LPjtoAYUU8WKqCvbCHAIg3dpk71reoYd1scLnQ,1807
|
112
|
-
cwyodmodules-0.3.
|
113
|
-
cwyodmodules-0.3.
|
114
|
-
cwyodmodules-0.3.
|
115
|
-
cwyodmodules-0.3.
|
116
|
-
cwyodmodules-0.3.
|
112
|
+
cwyodmodules-0.3.80.dist-info/licenses/LICENSE,sha256=UqBDTipijsSW2ZSOXyTZnMsXmLoEHTgNEM0tL4g-Sso,1150
|
113
|
+
cwyodmodules-0.3.80.dist-info/METADATA,sha256=vFAmhkoj9X9NhxMHKuEy726Z9zHiDjtqjWNWFQ0XqAw,2002
|
114
|
+
cwyodmodules-0.3.80.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
115
|
+
cwyodmodules-0.3.80.dist-info/top_level.txt,sha256=99RENLbkdRX-qpJvsxZ5AfmTL5s6shSaKOWYpz1vwzg,13
|
116
|
+
cwyodmodules-0.3.80.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|