commons-metrics 0.0.28__py3-none-any.whl → 0.0.29__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.
- commons_metrics/__init__.py +1 -1
- commons_metrics/util.py +1 -11
- {commons_metrics-0.0.28.dist-info → commons_metrics-0.0.29.dist-info}/METADATA +1 -1
- {commons_metrics-0.0.28.dist-info → commons_metrics-0.0.29.dist-info}/RECORD +7 -7
- {commons_metrics-0.0.28.dist-info → commons_metrics-0.0.29.dist-info}/WHEEL +0 -0
- {commons_metrics-0.0.28.dist-info → commons_metrics-0.0.29.dist-info}/licenses/LICENSE +0 -0
- {commons_metrics-0.0.28.dist-info → commons_metrics-0.0.29.dist-info}/top_level.txt +0 -0
commons_metrics/__init__.py
CHANGED
|
@@ -12,4 +12,4 @@ from .text_simplifier import TextSimplifier
|
|
|
12
12
|
from .variable_finder import VariableFinder
|
|
13
13
|
|
|
14
14
|
__all__ = ['Util', 'DatabaseConnection', 'ComponentRepository', 'UpdateDesignSystemComponents', 'GitHubAPIClient', 'AzureDevOpsClient', 'S3FileManager', 'CacheManager', 'CommonsReposClient', 'DateUtils', 'TextSimplifier', 'VariableFinder']
|
|
15
|
-
__version__ = '0.0.
|
|
15
|
+
__version__ = '0.0.29'
|
commons_metrics/util.py
CHANGED
|
@@ -6,9 +6,7 @@ class Util:
|
|
|
6
6
|
|
|
7
7
|
@staticmethod
|
|
8
8
|
def get_secret_aws(secret_name: str, logger, region_name: str):
|
|
9
|
-
"""
|
|
10
|
-
Retrieves AWS Secrets Manager secret and returns database credentials
|
|
11
|
-
"""
|
|
9
|
+
"""Retrieves a secret from AWS Secrets Manager"""
|
|
12
10
|
try:
|
|
13
11
|
session = boto3.session.Session()
|
|
14
12
|
client = session.client(
|
|
@@ -20,14 +18,6 @@ class Util:
|
|
|
20
18
|
secret_string = get_secret_value_response['SecretString']
|
|
21
19
|
secret_json = json.loads(secret_string)
|
|
22
20
|
|
|
23
|
-
required_keys = ["password", "host", "port", "username", "dbname"]
|
|
24
|
-
missing_keys = [key for key in required_keys if key not in secret_json]
|
|
25
|
-
|
|
26
|
-
if missing_keys:
|
|
27
|
-
msg = f"Missing required keys in AWS secret: {missing_keys}"
|
|
28
|
-
logger.error(msg)
|
|
29
|
-
raise KeyError(msg)
|
|
30
|
-
|
|
31
21
|
return secret_json
|
|
32
22
|
|
|
33
23
|
except Exception as e:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
commons_metrics/__init__.py,sha256=
|
|
1
|
+
commons_metrics/__init__.py,sha256=dlqwKA_Z05nnAXtz21MC4KshlSi9EKwzbWfK0_oiKw4,796
|
|
2
2
|
commons_metrics/azure_devops_client.py,sha256=XrGqhr4voFUtGkdB27tnzsMSiNdpfY4stQUU51e1a0U,16755
|
|
3
3
|
commons_metrics/cache_manager.py,sha256=HOeup9twUizjJAbh1MNXdPT8BMVeLFoolOWlAzMTXkE,2651
|
|
4
4
|
commons_metrics/commons_repos_client.py,sha256=PiAMLWuDnI8AlZzE3sfQ3s2P23UrYbbqaq63AFRroHc,4695
|
|
@@ -9,10 +9,10 @@ commons_metrics/repositories.py,sha256=DXa9ZkqtGZ95weOsPKf8-8mnxKNhyjdiu60hiTi5N
|
|
|
9
9
|
commons_metrics/s3_file_manager.py,sha256=Mm7vlPJeXB46LnCXFs9oz7PQezcIcgYLlSJqMzVf72g,3384
|
|
10
10
|
commons_metrics/text_simplifier.py,sha256=jRYckQ5APR0A3wY4hg70kOHxHUFuGzd6D-CJC3__j78,1518
|
|
11
11
|
commons_metrics/update_design_components.py,sha256=QpY0GCCCMjdYOZ7b8oNigU9iTpiGx91CYsyWwN8WVDA,7660
|
|
12
|
-
commons_metrics/util.py,sha256=
|
|
12
|
+
commons_metrics/util.py,sha256=RYpC0O9SRWFcLoAIFQp4PvpgCAiaKU0-ouY3c70oDMw,840
|
|
13
13
|
commons_metrics/variable_finder.py,sha256=pxI_XSd-lq_AiUjDbcUC4knIZhWZwt7HQrQOa-F0ud4,8061
|
|
14
|
-
commons_metrics-0.0.
|
|
15
|
-
commons_metrics-0.0.
|
|
16
|
-
commons_metrics-0.0.
|
|
17
|
-
commons_metrics-0.0.
|
|
18
|
-
commons_metrics-0.0.
|
|
14
|
+
commons_metrics-0.0.29.dist-info/licenses/LICENSE,sha256=jsHZ2Sh1wCL74HC25pDDGXCyQ0xgsTAy62FvEnehKIg,1067
|
|
15
|
+
commons_metrics-0.0.29.dist-info/METADATA,sha256=s_TBW9g0jDXvkY4-bkAHG0KhI2RhU1aypx43CW1Osmg,402
|
|
16
|
+
commons_metrics-0.0.29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
17
|
+
commons_metrics-0.0.29.dist-info/top_level.txt,sha256=lheUN-3OKdU3A8Tg8Y-1IEB_9i_vVRA0g_FOiUsTQz8,16
|
|
18
|
+
commons_metrics-0.0.29.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|