reach_commons 0.18.32__py3-none-any.whl → 0.18.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.
- reach_commons/.DS_Store +0 -0
- reach_commons/app_logging/logging_utils.py +6 -0
- reach_commons/clients/.DS_Store +0 -0
- reach_commons/validations.py +8 -3
- {reach_commons-0.18.32.dist-info → reach_commons-0.18.35.dist-info}/METADATA +1 -1
- {reach_commons-0.18.32.dist-info → reach_commons-0.18.35.dist-info}/RECORD +7 -5
- {reach_commons-0.18.32.dist-info → reach_commons-0.18.35.dist-info}/WHEEL +0 -0
reach_commons/.DS_Store
ADDED
|
Binary file
|
|
@@ -8,4 +8,10 @@ def init_logger(name: str):
|
|
|
8
8
|
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
|
9
9
|
force=True,
|
|
10
10
|
)
|
|
11
|
+
for noisy in ("botocore", "boto3", "urllib3"):
|
|
12
|
+
logging.getLogger(noisy).setLevel(logging.WARNING)
|
|
11
13
|
return logging.getLogger(name)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def log_with_event(level_fn, msg, event):
|
|
17
|
+
level_fn(f"{msg} | event={event}")
|
|
Binary file
|
reach_commons/validations.py
CHANGED
|
@@ -5,10 +5,15 @@ from reach_commons.app_logging.logger import get_reach_logger
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class CommonsPhoneNumberValidation:
|
|
8
|
-
def __init__(
|
|
8
|
+
def __init__(
|
|
9
|
+
self,
|
|
10
|
+
logger=get_reach_logger(),
|
|
11
|
+
account_sid="AC1f9d2cb1c49cf9522f0de29861c9652d",
|
|
12
|
+
auth_token="2a5557dd0c80ea45bc23b3de68455480",
|
|
13
|
+
):
|
|
9
14
|
self.base_url = "https://lookups.twilio.com/v1/PhoneNumbers/"
|
|
10
|
-
self.account_sid = account_sid
|
|
11
|
-
self.auth_token = auth_token
|
|
15
|
+
self.account_sid = account_sid
|
|
16
|
+
self.auth_token = auth_token
|
|
12
17
|
self.logger = logger
|
|
13
18
|
|
|
14
19
|
def is_valid_phone_number(self, phone_number):
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
reach_commons/.DS_Store,sha256=M7WbC5LcTvuTEuj3k7z3tqzMSVGgu87auq6UOLoSv2M,6148
|
|
1
2
|
reach_commons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
3
|
reach_commons/app_logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
4
|
reach_commons/app_logging/http_logger.py,sha256=mljQCdmsmtD2HsC_gsFwZAxPlAiLPYVirVrCjXFxitY,2541
|
|
4
5
|
reach_commons/app_logging/log_deprecated_endpoints.py,sha256=yXs9Jh7V0_0cMnzwXV9WRgCdFXe_tybcFE1eQl2KNC4,2020
|
|
5
6
|
reach_commons/app_logging/logger.py,sha256=Iq2XTl1zLgHDmVsTMdlFadcYJOqQNhBcFSscacKs_Xs,2295
|
|
6
7
|
reach_commons/app_logging/logging_config.py,sha256=Y1JaZOoQBWgQjkOqYmeDRIm0p2eCOl3yTzgsgqyqm8I,1539
|
|
7
|
-
reach_commons/app_logging/logging_utils.py,sha256=
|
|
8
|
+
reach_commons/app_logging/logging_utils.py,sha256=zeDRm3DugbuqMIDstTsVyH5xU_ZV-WAcCINxb6qYdJY,491
|
|
9
|
+
reach_commons/clients/.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
|
|
8
10
|
reach_commons/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
11
|
reach_commons/clients/event_processor.py,sha256=KmYF0kuZxLmHQjJASXMr5jz2D_D3WNHB0c4QOlZo1_E,2024
|
|
10
12
|
reach_commons/clients/hubspot.py,sha256=ntAzvwoaq78MkKaVoZ7geND-AafAzccNnJogfJDahVA,5497
|
|
@@ -27,7 +29,7 @@ reach_commons/reach_base_model.py,sha256=vgdGDcZr3iXMmyRhmBhOf_LKWB_6QzT3r_Yiyo6
|
|
|
27
29
|
reach_commons/redis_manager.py,sha256=SgUtdtt0eV4bUwsWDankIa9Bjfgcm2DKcmVMQT6ptF0,2946
|
|
28
30
|
reach_commons/sms_smart_encoding.py,sha256=92y0RmZ0l4ONHpC9qeO5KfViSNq64yE2rc7lhNDSZqE,1241
|
|
29
31
|
reach_commons/utils.py,sha256=dMgKIGqTgoSItuBI8oz81gKtW3qi21Jkljv9leS_V88,8475
|
|
30
|
-
reach_commons/validations.py,sha256=
|
|
31
|
-
reach_commons-0.18.
|
|
32
|
-
reach_commons-0.18.
|
|
33
|
-
reach_commons-0.18.
|
|
32
|
+
reach_commons/validations.py,sha256=x_lkrtlrCAJC_f7mZb19JjfKFbYlPFv-P84K_lbZyYs,1056
|
|
33
|
+
reach_commons-0.18.35.dist-info/METADATA,sha256=gD0kZHrRs6H0VzzuUYrxs4EFOju-ubt9hdnB4AdLMLM,1965
|
|
34
|
+
reach_commons-0.18.35.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
35
|
+
reach_commons-0.18.35.dist-info/RECORD,,
|
|
File without changes
|