reach_commons 0.18.2__py3-none-any.whl → 0.18.3__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.
@@ -17,10 +17,12 @@ class BaseKMSClient:
17
17
  logger=get_reach_logger(),
18
18
  region_name="us-east-1",
19
19
  profile_name=None,
20
+ enviroment=None,
20
21
  ):
21
22
  self.region_name = region_name
22
23
  self.profile_name = profile_name
23
24
  self.logger = logger
25
+ self.enviroment = enviroment or os.environ.get("ENV", "staging")
24
26
 
25
27
  def handle_exception(self, exc, secret, ciphertext):
26
28
  error_msg = (
@@ -55,7 +57,7 @@ class KMSClient(BaseKMSClient):
55
57
  )
56
58
  )
57
59
 
58
- key_alias = f"alias/{os.environ.get('ENV', 'staging')}-db-data".lower()
60
+ key_alias = f"alias/{self.enviroment}-db-data".lower()
59
61
 
60
62
  return self.encrypt(custom_context, data_to_encrypt, key_alias)
61
63
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: reach_commons
3
- Version: 0.18.2
3
+ Version: 0.18.3
4
4
  Summary: Reach Commons is a versatile utility library designed to streamline and enhance development workflows within the Reach ecosystem.
5
5
  License: MIT
6
6
  Author: Wilson Moraes
@@ -19,7 +19,7 @@ reach_commons/reach_aws/commons.py,sha256=qQba0li75BIpmyVc0sDVrrxbtYvDCedF6RmFD-
19
19
  reach_commons/reach_aws/dynamo_db.py,sha256=ndwLlaDwb96IlsnpAeeKPg-2DOjxe0JSM0y-zdlOc6E,7082
20
20
  reach_commons/reach_aws/exceptions.py,sha256=x0RL5ktNtzxg0KykhEVWReBq_dEtciK6B2vMs_s4C9k,915
21
21
  reach_commons/reach_aws/firehose.py,sha256=1xFKLWMv3bNo3PPW5gtaL6NqzUDyVil6B768slj2wbY,5674
22
- reach_commons/reach_aws/kms.py,sha256=HDJ3lnKm6Jah2asizUDtQErlVSjrcV9lOfBPHzUVguY,4526
22
+ reach_commons/reach_aws/kms.py,sha256=e5QnDZaR9mUEA3u2KtHdjGQfkxWN9VyuOSnpeyX3LHs,4609
23
23
  reach_commons/reach_aws/s3.py,sha256=2MLlDNFx0SROJBpE_KjJefyrB7lMqTlrYuRhSZx4iKs,3945
24
24
  reach_commons/reach_aws/sqs.py,sha256=LKQ42vRJko2HTE8gO_lRvftnstIMI3DeFZakvLUM0BQ,15864
25
25
  reach_commons/reach_base_model.py,sha256=vgdGDcZr3iXMmyRhmBhOf_LKWB_6QzT3r_Yiyo6OmEk,3009
@@ -27,6 +27,6 @@ reach_commons/redis_manager.py,sha256=SgUtdtt0eV4bUwsWDankIa9Bjfgcm2DKcmVMQT6ptF
27
27
  reach_commons/sms_smart_encoding.py,sha256=92y0RmZ0l4ONHpC9qeO5KfViSNq64yE2rc7lhNDSZqE,1241
28
28
  reach_commons/utils.py,sha256=dMgKIGqTgoSItuBI8oz81gKtW3qi21Jkljv9leS_V88,8475
29
29
  reach_commons/validations.py,sha256=jc78boM62S9Z0Ip_nV1z7I983gGpW2Y7vOCQtmia8OU,964
30
- reach_commons-0.18.2.dist-info/METADATA,sha256=XUrMggr3gHoyheekCHmxoofYmr52bUStV4u7z-hHqr8,1860
31
- reach_commons-0.18.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
32
- reach_commons-0.18.2.dist-info/RECORD,,
30
+ reach_commons-0.18.3.dist-info/METADATA,sha256=C74AVNyAAsoU4bht3Z2kTW8bStKAcWQw3TJCPF2g5-4,1860
31
+ reach_commons-0.18.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
32
+ reach_commons-0.18.3.dist-info/RECORD,,