cwyodmodules 0.3.33__py3-none-any.whl → 0.3.35__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/batch/utilities/helpers/secret_helper.py +3 -7
- cwyodmodules/logging_config.py +11 -1
- {cwyodmodules-0.3.33.dist-info → cwyodmodules-0.3.35.dist-info}/METADATA +2 -2
- {cwyodmodules-0.3.33.dist-info → cwyodmodules-0.3.35.dist-info}/RECORD +7 -7
- {cwyodmodules-0.3.33.dist-info → cwyodmodules-0.3.35.dist-info}/WHEEL +0 -0
- {cwyodmodules-0.3.33.dist-info → cwyodmodules-0.3.35.dist-info}/licenses/LICENSE +0 -0
- {cwyodmodules-0.3.33.dist-info → cwyodmodules-0.3.35.dist-info}/top_level.txt +0 -0
@@ -1,11 +1,7 @@
|
|
1
1
|
from ..helpers.azure_identity_helper import AzureIdentityHelper
|
2
2
|
from azure.keyvault.secrets import SecretClient
|
3
3
|
|
4
|
-
from ...utilities.helpers.env_helper import EnvHelper
|
5
4
|
from logging_config import logger
|
6
|
-
env_helper: EnvHelper = EnvHelper()
|
7
|
-
log_args = env_helper.LOG_ARGS
|
8
|
-
log_result = env_helper.LOG_RESULT
|
9
5
|
|
10
6
|
|
11
7
|
class SecretHelper:
|
@@ -34,7 +30,7 @@ class SecretHelper:
|
|
34
30
|
connection_verify=True,
|
35
31
|
)
|
36
32
|
|
37
|
-
@logger.trace_function(log_args=
|
33
|
+
@logger.trace_function(log_args=False, log_result=False)
|
38
34
|
def get_secret(self, secret_name: str) -> str:
|
39
35
|
"""
|
40
36
|
Retrieves the value of a secret from the environment variables or Azure Key Vault.
|
@@ -52,7 +48,7 @@ class SecretHelper:
|
|
52
48
|
secret_value = self.secret_client.get_secret(name=secret_name).value
|
53
49
|
return secret_value
|
54
50
|
|
55
|
-
@logger.trace_function(log_args=
|
51
|
+
@logger.trace_function(log_args=False, log_result=False)
|
56
52
|
def set_secret(self, secret_name: str, secret_value: str) -> None:
|
57
53
|
"""
|
58
54
|
Sets the value of a secret in Azure Key Vault only if it doesn't exist or has a different value.
|
@@ -80,7 +76,7 @@ class SecretHelper:
|
|
80
76
|
logger.warning(f"Secret {secret_name} has been created")
|
81
77
|
|
82
78
|
|
83
|
-
@logger.trace_function(log_args=
|
79
|
+
@logger.trace_function(log_args=False, log_result=False)
|
84
80
|
def get_secret_from_json(self, secret_name: str) -> str:
|
85
81
|
secret_value = self.secret_client.get_secret(secret_name).value
|
86
82
|
return secret_value
|
cwyodmodules/logging_config.py
CHANGED
@@ -2,13 +2,23 @@ import os
|
|
2
2
|
from azpaddypy.mgmt.logging import create_app_logger
|
3
3
|
|
4
4
|
application_insights_connection_string=os.getenv("APPLICATIONINSIGHTS_CONNECTION_STRING")
|
5
|
-
|
5
|
+
instrumentation_options={
|
6
|
+
"azure_sdk": {"enabled": True},
|
7
|
+
"django": {"enabled": False},
|
8
|
+
"fastapi": {"enabled": False},
|
9
|
+
"flask": {"enabled": True},
|
10
|
+
"psycopg2": {"enabled": True},
|
11
|
+
"requests": {"enabled": True},
|
12
|
+
"urllib": {"enabled": True},
|
13
|
+
"urllib3": {"enabled": True},
|
14
|
+
}
|
6
15
|
# Create a single instance of the logger
|
7
16
|
logger = create_app_logger(
|
8
17
|
connection_string=application_insights_connection_string,
|
9
18
|
service_name=__name__,
|
10
19
|
service_version="1.0.0",
|
11
20
|
enable_console_logging=True,
|
21
|
+
instrumentation_options=instrumentation_options
|
12
22
|
)
|
13
23
|
|
14
24
|
# Export the logger instance
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: cwyodmodules
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.35
|
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.2.
|
43
|
+
Requires-Dist: azpaddypy>=0.2.7
|
44
44
|
Dynamic: license-file
|
45
45
|
|
46
46
|
# paddypy
|
@@ -1,4 +1,4 @@
|
|
1
|
-
cwyodmodules/logging_config.py,sha256
|
1
|
+
cwyodmodules/logging_config.py,sha256=YhJTNVz7V5R0RDMZ7ABJkS430nnF6XXBQY7cdyJ6v-8,1045
|
2
2
|
cwyodmodules/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
cwyodmodules/api/chat_history.py,sha256=cVURaRycpES7YXxGCqqcb8IIr3WDmisGmwufhp-H970,20384
|
4
4
|
cwyodmodules/batch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -41,7 +41,7 @@ cwyodmodules/batch/utilities/helpers/env_helper.py,sha256=xqGD7msUDDcWT-GeazYnm7
|
|
41
41
|
cwyodmodules/batch/utilities/helpers/lightrag_helper.py,sha256=IvJnSYpEweyMJ6ENt_fNeClcMvHbC5aBs0GZNmJMbT8,3822
|
42
42
|
cwyodmodules/batch/utilities/helpers/llm_helper.py,sha256=3KPpWHizT3CONWl7X2nAqbk40gGf0Wwyr-AD38iir4g,8114
|
43
43
|
cwyodmodules/batch/utilities/helpers/orchestrator_helper.py,sha256=mCcZyMFG0otnw9gzWd-PYocHmDdFDVg-RT9oDPiDZPk,897
|
44
|
-
cwyodmodules/batch/utilities/helpers/secret_helper.py,sha256=
|
44
|
+
cwyodmodules/batch/utilities/helpers/secret_helper.py,sha256=yMPpGKYuoDa0nkynl1OAAuMxpMphuEY-6MwBNPcglnw,2830
|
45
45
|
cwyodmodules/batch/utilities/helpers/config/assistant_strategy.py,sha256=uT8h646zEURU9x8oDOH7pWoZKb0Mw6dA2nJtA2M-ufg,171
|
46
46
|
cwyodmodules/batch/utilities/helpers/config/config_helper.py,sha256=5IVmrXi7WBGhNE_PN3dBVpHjBhQDFi0WnDN-HjQpwy8,14319
|
47
47
|
cwyodmodules/batch/utilities/helpers/config/conversation_flow.py,sha256=4nP8a-I-sME5-2unzWWBNpTzWdfpfc5_EAYU6Pn6LAQ,94
|
@@ -109,8 +109,8 @@ cwyodmodules/graphrag/query/generate.py,sha256=xBnZs2U9xFWtPk4AfAZgYKbHdcxNcIO6Q
|
|
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.35.dist-info/licenses/LICENSE,sha256=UqBDTipijsSW2ZSOXyTZnMsXmLoEHTgNEM0tL4g-Sso,1150
|
113
|
+
cwyodmodules-0.3.35.dist-info/METADATA,sha256=Fcv9mPqvwG7iufW4-v9ryWyuG_7L2DTFK9nb2jOQqLM,2002
|
114
|
+
cwyodmodules-0.3.35.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
115
|
+
cwyodmodules-0.3.35.dist-info/top_level.txt,sha256=99RENLbkdRX-qpJvsxZ5AfmTL5s6shSaKOWYpz1vwzg,13
|
116
|
+
cwyodmodules-0.3.35.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|