reach_commons 0.18.27__py3-none-any.whl → 0.18.28__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.
@@ -647,3 +647,40 @@ class POSApiPullerSQSNotifier(SQSClient):
647
647
  message_attributes=message_attributes,
648
648
  delay_seconds=delay_seconds,
649
649
  )
650
+
651
+
652
+ class AnomalySQSNotifier(SQSClient):
653
+ """
654
+ Notificador genérico para enviar eventos de anomalias via SQS
655
+ para outro serviço responsável por montar e enviar o e-mail.
656
+ """
657
+
658
+ DEFAULT_REGION = "us-east-1"
659
+ DEFAULT_TOPIC = "reach-data-bridge-messages-queue"
660
+
661
+ def __init__(
662
+ self,
663
+ *,
664
+ topic_name: str = None,
665
+ service_name: str = None,
666
+ region_name: str = DEFAULT_REGION,
667
+ logger=None,
668
+ env: str = os.environ.get("ENV", "Staging"),
669
+ ):
670
+ """
671
+ Args:
672
+ topic_name: Nome base da fila (sem prefixo de env). Default: reach-data-bridge-messages-queue
673
+ service_name: Nome do serviço para uso no message_attribute. Default: nome da classe.
674
+ """
675
+ if logger is None:
676
+ logger = get_reach_logger()
677
+
678
+ self.env = env
679
+ self.service_name = service_name or self.__class__.__name__
680
+ base_topic = topic_name or self.DEFAULT_TOPIC
681
+
682
+ super().__init__(
683
+ region_name=region_name,
684
+ logger=logger,
685
+ topic_name=f"{env}-{base_topic}",
686
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reach_commons
3
- Version: 0.18.27
3
+ Version: 0.18.28
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: Engineering
@@ -21,12 +21,12 @@ reach_commons/reach_aws/exceptions.py,sha256=x0RL5ktNtzxg0KykhEVWReBq_dEtciK6B2v
21
21
  reach_commons/reach_aws/firehose.py,sha256=1xFKLWMv3bNo3PPW5gtaL6NqzUDyVil6B768slj2wbY,5674
22
22
  reach_commons/reach_aws/kms.py,sha256=ZOfyJMQUgxJEojRoB7-aCxtATpNx1Ig522IUYH11NZ4,4678
23
23
  reach_commons/reach_aws/s3.py,sha256=2MLlDNFx0SROJBpE_KjJefyrB7lMqTlrYuRhSZx4iKs,3945
24
- reach_commons/reach_aws/sqs.py,sha256=RXglKdDQLu27uelHLzCfdb61eZu7EP_faf96bVZ84yw,20454
24
+ reach_commons/reach_aws/sqs.py,sha256=U2WUgxg9n4vBuNfoxVcrNHUZXOvLxiT0gVFm-LiPN1A,21606
25
25
  reach_commons/reach_base_model.py,sha256=vgdGDcZr3iXMmyRhmBhOf_LKWB_6QzT3r_Yiyo6OmEk,3009
26
26
  reach_commons/redis_manager.py,sha256=SgUtdtt0eV4bUwsWDankIa9Bjfgcm2DKcmVMQT6ptF0,2946
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=CJdWg8qc9ILe3rYHYTLdr2upRspsM_8ghhm4IXX4Pg8,1028
30
- reach_commons-0.18.27.dist-info/METADATA,sha256=cLdM-KGX94zRF9CqlwmymtrvAXPyUclBDEEcUotKAmo,1965
31
- reach_commons-0.18.27.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
32
- reach_commons-0.18.27.dist-info/RECORD,,
30
+ reach_commons-0.18.28.dist-info/METADATA,sha256=EuZa3sbjpLxWjLpKwLAhy2WZUD-mjc3GGdIPzjq-idU,1965
31
+ reach_commons-0.18.28.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
32
+ reach_commons-0.18.28.dist-info/RECORD,,