csc-cia-stne 0.0.44__py3-none-any.whl → 0.0.46__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
csc_cia_stne/__init__.py CHANGED
@@ -62,7 +62,7 @@ def _running_in_container():
62
62
 
63
63
  return False
64
64
 
65
- def logger(nome:str=__name__):
65
+ def logger(nome:str='__main__'):
66
66
  """
67
67
  Retorna um objeto logger com base no ambiente de execução.
68
68
  Se a variável de ambiente 'ambiente_de_execucao' estiver definida e for igual a "karavela",
@@ -242,7 +242,10 @@ def get_logger(nome):
242
242
 
243
243
  # Sendo setado aqui pois no basicConfig estava gerando logs para as libs do slack_sdk e big query
244
244
 
245
- logger.addHandler(CustomRichHandler())
245
+ #logger.addHandler(CustomRichHandler())
246
+ # Adiciona o CustomRichHandler se ainda não estiver presente
247
+ if not any(isinstance(handler, CustomRichHandler) for handler in logger.handlers):
248
+ logger.addHandler(CustomRichHandler())
246
249
 
247
250
  logger.setLevel(log_config_level)
248
251
 
csc_cia_stne/provio.py CHANGED
@@ -4,6 +4,8 @@ from requests.auth import HTTPBasicAuth
4
4
  from pydantic import BaseModel, Field, ValidationError
5
5
  from typing import List, Dict, Union
6
6
 
7
+ log = logging.getLogger('__main__')
8
+
7
9
  # Validadores
8
10
  class ProvioModel(BaseModel):
9
11
  """
@@ -90,7 +92,7 @@ class Provio:
90
92
  skip += 500
91
93
  requisicao += 1
92
94
  if verbose:
93
- logging.info(f"Exportando relatório: Requisição #{str(requisicao).zfill(3)} - {len(todos_os_dados)} registros no total")
95
+ log.info(f"Exportando relatório: Requisição #{str(requisicao).zfill(3)}: {len(todos_os_dados)} registros no total")
94
96
 
95
97
  else:
96
98
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: csc_cia_stne
3
- Version: 0.0.44
3
+ Version: 0.0.46
4
4
  Summary: Biblioteca do time CSC-CIA utilizada no desenvolvimento de RPAs
5
5
  License: MIT
6
6
  Keywords: karavela,csc,cia,stone,rpa
@@ -1,4 +1,4 @@
1
- csc_cia_stne/__init__.py,sha256=UbsK0FeBPLFvUs3LYVxMxAW5Vk24StVbBfGOxCJ2PPs,2464
1
+ csc_cia_stne/__init__.py,sha256=lHYOTmSOu5K-G1lKYKqrK1evkjOW1WTAxSHjWHk99-k,2466
2
2
  csc_cia_stne/bc_correios.py,sha256=pQAnRrcXEMrx3N1MWydZVIhEQLerh3x8-0B045zZIzk,24174
3
3
  csc_cia_stne/bc_sta.py,sha256=f75HJ7FLIDSJFLDTvvSvCYo9z0HchzP7rDY5WIdiKXY,16830
4
4
  csc_cia_stne/email.py,sha256=RK_TzWBVnUfpP-s5NvjTJJjzhICy8e2fME9EuaiySMY,8162
@@ -6,8 +6,8 @@ csc_cia_stne/gcp_bigquery.py,sha256=jYxvqrWDOPkxc05U4aef7V5lL8ptqsE93lfn0dLFyvc,
6
6
  csc_cia_stne/google_drive.py,sha256=JcXKlRBSxf5CKM-alT4ZpqWVWLZQfIYIX42_nENoTgU,11896
7
7
  csc_cia_stne/karavela.py,sha256=LlpFiDu0ww7eh8F-oREWSQo2mVoQMibx0EGiHR6tznI,4231
8
8
  csc_cia_stne/logger_json.py,sha256=CXxSCOFGMymDi8XE9SKnPKjW4D0wJLqDLnxqePS26i8,3187
9
- csc_cia_stne/logger_rich.py,sha256=9gr-g7kGnL9K88hLukso8RddywPt9rP2PK4E4rIeIwQ,8137
10
- csc_cia_stne/provio.py,sha256=yTRX4YJ6RdNc2ZCVPgsIEgsxe3wQgwnXns4bPX4plAI,3955
9
+ csc_cia_stne/logger_rich.py,sha256=WlMqxH1lMy-tzK0I4NpBRgSzPdHc2-YSU71N3SsKM5A,8338
10
+ csc_cia_stne/provio.py,sha256=G-pDnHYLSp97joc7S7dvwjNvl3omnTmvdi3rOPQf5GA,3987
11
11
  csc_cia_stne/servicenow.py,sha256=3eifPWOIGv2udGpI3cr2SkMMKcQR4xHlA_fiOdw_fmg,32136
12
12
  csc_cia_stne/slack.py,sha256=33_UNF7M529eIuWjmzSJFEZ4RmVNkFkuVxvxwsKY1tQ,8126
13
13
  csc_cia_stne/stne_admin.py,sha256=vnGSEzcmqWE42vg71oEuoRg6ENaGsZsXFOjxduSH4KU,23561
@@ -22,8 +22,8 @@ csc_cia_stne/utilitarios/validations/GcpBigQueryValidator.py,sha256=PfCeeQquheZk
22
22
  csc_cia_stne/utilitarios/validations/GoogleDriveValidator.py,sha256=PBo-AV2bjR__4o9jYxuXO-UyxjAZvVwYgMbtsrFK2sI,4537
23
23
  csc_cia_stne/utilitarios/validations/ServiceNowValidator.py,sha256=yleKUIo1ZfyloP9fDPNjv3JJXdLcocT81WIgRSYmqEA,14423
24
24
  csc_cia_stne/utilitarios/validations/__init__.py,sha256=O_qyEU2ji3u6LHUXZCXvUFsMpoMWL625qqHTXyXivTA,106
25
- csc_cia_stne-0.0.44.dist-info/LICENCE,sha256=LPGMtgKki2C3KEZP7hDhA1HBrlq5JCHkIeStUCLEMx4,1073
26
- csc_cia_stne-0.0.44.dist-info/METADATA,sha256=dvoktNYqBI6-wdRLOTUQ2wLABO5RRG_VAmxNzblkLUw,1121
27
- csc_cia_stne-0.0.44.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
28
- csc_cia_stne-0.0.44.dist-info/top_level.txt,sha256=ldo7GVv3tQx5KJvwBzdZzzQmjPys2NDVVn1rv0BOF2Q,13
29
- csc_cia_stne-0.0.44.dist-info/RECORD,,
25
+ csc_cia_stne-0.0.46.dist-info/LICENCE,sha256=LPGMtgKki2C3KEZP7hDhA1HBrlq5JCHkIeStUCLEMx4,1073
26
+ csc_cia_stne-0.0.46.dist-info/METADATA,sha256=m3ty7x_xf90UxVSKQN3_BBGZ9m11C1iw6Z7wmiyiVjs,1121
27
+ csc_cia_stne-0.0.46.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
28
+ csc_cia_stne-0.0.46.dist-info/top_level.txt,sha256=ldo7GVv3tQx5KJvwBzdZzzQmjPys2NDVVn1rv0BOF2Q,13
29
+ csc_cia_stne-0.0.46.dist-info/RECORD,,