reach_commons 0.18.39__py3-none-any.whl → 0.18.41__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.
|
@@ -45,8 +45,8 @@ def _extract_secret_string(response: Dict[str, Any], secret_arn: str) -> str:
|
|
|
45
45
|
def get_secret(
|
|
46
46
|
secret_arn: str,
|
|
47
47
|
region_name: str = "us-east-1",
|
|
48
|
-
host=os.getenv("
|
|
49
|
-
db_name=os.getenv("
|
|
48
|
+
host=os.getenv("MYSQL_HOST"),
|
|
49
|
+
db_name=os.getenv("MYSQL_DB_NAME"),
|
|
50
50
|
) -> Dict[str, Any]:
|
|
51
51
|
"""
|
|
52
52
|
Load DB credentials from AWS Secrets Manager and host from SSM Parameter Store.
|
|
@@ -63,7 +63,10 @@ def get_secret(
|
|
|
63
63
|
if not host:
|
|
64
64
|
raise ValueError(f"RDS host is not configured")
|
|
65
65
|
|
|
66
|
-
secrets_data =
|
|
66
|
+
secrets_data = None
|
|
67
|
+
|
|
68
|
+
if secrets_data is None:
|
|
69
|
+
secrets_data = _get_secret_json(secret_arn, region_name)
|
|
67
70
|
|
|
68
71
|
if not isinstance(secrets_data, dict):
|
|
69
72
|
raise ValueError(
|
|
@@ -17,7 +17,7 @@ reach_commons/mongo/customer_persistence_async.py,sha256=BmcP8TXyyQah-GYM3wcKi1b
|
|
|
17
17
|
reach_commons/mongo/validation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
reach_commons/reach_aws/__init__.py,sha256=xb97rt0lBd0wz9ZhULQ7YVAOceOS-AkvNVM4jfLOjYE,86
|
|
19
19
|
reach_commons/reach_aws/commons.py,sha256=qQba0li75BIpmyVc0sDVrrxbtYvDCedF6RmFD-V4MYQ,259
|
|
20
|
-
reach_commons/reach_aws/db_config.py,sha256=
|
|
20
|
+
reach_commons/reach_aws/db_config.py,sha256=TIaZA-SspFuiIWYnYllg1-eAAISM7vBLXYqUj09HZLo,2713
|
|
21
21
|
reach_commons/reach_aws/dynamo_db.py,sha256=BL3QcKzx4uZic-Ui12tln_GMSKe297FdfyIzFPE7veE,7140
|
|
22
22
|
reach_commons/reach_aws/exceptions.py,sha256=x0RL5ktNtzxg0KykhEVWReBq_dEtciK6B2vMs_s4C9k,915
|
|
23
23
|
reach_commons/reach_aws/firehose.py,sha256=1xFKLWMv3bNo3PPW5gtaL6NqzUDyVil6B768slj2wbY,5674
|
|
@@ -30,6 +30,6 @@ reach_commons/redis_manager.py,sha256=yRed53ZKlbIb6rZnL53D1F_aB-xWT3nbeUP2cqYzho
|
|
|
30
30
|
reach_commons/sms_smart_encoding.py,sha256=92y0RmZ0l4ONHpC9qeO5KfViSNq64yE2rc7lhNDSZqE,1241
|
|
31
31
|
reach_commons/utils.py,sha256=dMgKIGqTgoSItuBI8oz81gKtW3qi21Jkljv9leS_V88,8475
|
|
32
32
|
reach_commons/validations.py,sha256=x_lkrtlrCAJC_f7mZb19JjfKFbYlPFv-P84K_lbZyYs,1056
|
|
33
|
-
reach_commons-0.18.
|
|
34
|
-
reach_commons-0.18.
|
|
35
|
-
reach_commons-0.18.
|
|
33
|
+
reach_commons-0.18.41.dist-info/METADATA,sha256=RbAT9hck9WEqrlfCwigxRa1-JyL6AkcgnO0D5J-lcvw,1863
|
|
34
|
+
reach_commons-0.18.41.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
35
|
+
reach_commons-0.18.41.dist-info/RECORD,,
|
|
File without changes
|