reach_commons 0.18.3__py3-none-any.whl → 0.18.5__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.
@@ -4,8 +4,8 @@ import requests
4
4
 
5
5
 
6
6
  class ReachDataBridgeClient:
7
- def __init__(self):
8
- self.environment = os.environ.get("ENV", "Staging")
7
+ def __init__(self, environment=None):
8
+ self.environment = environment or os.environ.get("ENV", "Staging")
9
9
 
10
10
  @property
11
11
  def base_url(self):
@@ -5,8 +5,8 @@ import requests
5
5
 
6
6
 
7
7
  class ReachOpsApiClient:
8
- def __init__(self):
9
- self.environment = os.environ.get("ENV", "Staging")
8
+ def __init__(self, environment=None):
9
+ self.environment = environment or os.environ.get("ENV", "Staging")
10
10
 
11
11
  @property
12
12
  def base_url(self):
@@ -45,13 +45,16 @@ class KMSClient(BaseKMSClient):
45
45
 
46
46
  def encrypt_for_business(self, data_to_encrypt, business_id):
47
47
  custom_context = {"business_id": business_id}
48
+ data_to_encrypt = (
49
+ json.dumps(data_to_encrypt)
50
+ if isinstance(data_to_encrypt, dict)
51
+ else data_to_encrypt
52
+ )
48
53
  self.logger.info(
49
54
  "encript_for_business"
50
55
  "data_to_encrypt={}, "
51
56
  "business_id={} ,custom_context={!r}, ".format(
52
- json.dumps(data_to_encrypt)
53
- if isinstance(data_to_encrypt, dict)
54
- else data_to_encrypt,
57
+ data_to_encrypt,
55
58
  business_id,
56
59
  custom_context,
57
60
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: reach_commons
3
- Version: 0.18.3
3
+ Version: 0.18.5
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
@@ -8,8 +8,8 @@ reach_commons/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
8
8
  reach_commons/clients/event_processor.py,sha256=KmYF0kuZxLmHQjJASXMr5jz2D_D3WNHB0c4QOlZo1_E,2024
9
9
  reach_commons/clients/hubspot.py,sha256=ntAzvwoaq78MkKaVoZ7geND-AafAzccNnJogfJDahVA,5497
10
10
  reach_commons/clients/outscraper.py,sha256=vA3m9xYVNH47x0IbqWL05Kb-wBv_F2vcZOCsKvgL_50,2040
11
- reach_commons/clients/reach_data_bridge.py,sha256=ih4qOv7RLonefu61iJLgFtsXlHBb6XZITYlQtztCWvQ,5597
12
- reach_commons/clients/reach_ops_api.py,sha256=OLJ-PPQ_og49cAHDZ90BySJNtnQegDVFqs2KjHcv_cs,2407
11
+ reach_commons/clients/reach_data_bridge.py,sha256=TnKqn43qMAT7gexYsZNdTR43gh6mKEIG4jrlwJxp-SY,5630
12
+ reach_commons/clients/reach_ops_api.py,sha256=1kTY4cF2eBCl_kqs1r5lbzxt4_7EFRmltbYSTa5aQA4,2440
13
13
  reach_commons/mongo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  reach_commons/mongo/customer_persistence.py,sha256=acrtpyCWr9vLVq61saJ3_Vp4DYHFBTM9XqoYC72J84w,3735
15
15
  reach_commons/mongo/customer_persistence_async.py,sha256=BmcP8TXyyQah-GYM3wcKi1baqSCycjw7UadlxGywyQM,3892
@@ -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=e5QnDZaR9mUEA3u2KtHdjGQfkxWN9VyuOSnpeyX3LHs,4609
22
+ reach_commons/reach_aws/kms.py,sha256=-X4EJOh9IoncNn9C46X55mpSHPO5mR0B36lYLA2hhic,4670
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.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,,
30
+ reach_commons-0.18.5.dist-info/METADATA,sha256=hZLTgfYDUa3UgDcbul5YpLTaVY4drUSMNJDc_av3V64,1860
31
+ reach_commons-0.18.5.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
32
+ reach_commons-0.18.5.dist-info/RECORD,,