csc-cia-stne 0.0.43__tar.gz → 0.0.44__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/PKG-INFO +1 -1
  2. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/pyproject.toml +1 -1
  3. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/__init__.py +4 -4
  4. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/logger_json.py +4 -4
  5. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/logger_rich.py +2 -2
  6. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne.egg-info/PKG-INFO +1 -1
  7. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/LICENCE +0 -0
  8. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/README.md +0 -0
  9. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/README_PYPI.md +0 -0
  10. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/setup.cfg +0 -0
  11. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/bc_correios.py +0 -0
  12. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/bc_sta.py +0 -0
  13. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/email.py +0 -0
  14. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/gcp_bigquery.py +0 -0
  15. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/google_drive.py +0 -0
  16. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/karavela.py +0 -0
  17. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/provio.py +0 -0
  18. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/servicenow.py +0 -0
  19. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/slack.py +0 -0
  20. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/stne_admin.py +0 -0
  21. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/utilitarios/__init__.py +0 -0
  22. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/utilitarios/functions/__init__.py +0 -0
  23. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/utilitarios/functions/func_b64.py +0 -0
  24. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/utilitarios/functions/func_converters.py +0 -0
  25. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/utilitarios/functions/func_recriar_pastas.py +0 -0
  26. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/utilitarios/functions/func_settings.py +0 -0
  27. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/utilitarios/functions/func_titulo.py +0 -0
  28. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/utilitarios/validations/GcpBigQueryValidator.py +0 -0
  29. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/utilitarios/validations/GoogleDriveValidator.py +0 -0
  30. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/utilitarios/validations/ServiceNowValidator.py +0 -0
  31. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne/utilitarios/validations/__init__.py +0 -0
  32. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne.egg-info/SOURCES.txt +0 -0
  33. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne.egg-info/dependency_links.txt +0 -0
  34. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne.egg-info/requires.txt +0 -0
  35. {csc_cia_stne-0.0.43 → csc_cia_stne-0.0.44}/src/csc_cia_stne.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: csc_cia_stne
3
- Version: 0.0.43
3
+ Version: 0.0.44
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "csc_cia_stne"
7
- version = "0.0.43"
7
+ version = "0.0.44"
8
8
  license = { text = "MIT" }
9
9
  description = "Biblioteca do time CSC-CIA utilizada no desenvolvimento de RPAs"
10
10
  keywords = ["karavela", "csc", "cia", "stone", "rpa"]
@@ -62,7 +62,7 @@ def _running_in_container():
62
62
 
63
63
  return False
64
64
 
65
- def logger():
65
+ def logger(nome:str=__name__):
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",
@@ -78,12 +78,12 @@ def logger():
78
78
 
79
79
  if os.getenv('ambiente_de_execucao') is not None and os.getenv('ambiente_de_execucao') == "karavela":
80
80
 
81
- return get_logger_json()
81
+ return get_logger_json(nome)
82
82
 
83
83
  elif _running_in_container():
84
84
 
85
- return get_logger_json()
85
+ return get_logger_json(nome)
86
86
 
87
87
  else:
88
88
 
89
- return get_logger_rich()
89
+ return get_logger_rich(nome)
@@ -1,7 +1,7 @@
1
1
  import logging
2
2
  from pythonjsonlogger import jsonlogger
3
3
 
4
- def setup_json_logger():
4
+ def setup_json_logger(nome):
5
5
 
6
6
  def add_log_level(level_name, level_num, method_name=None):
7
7
  """
@@ -45,7 +45,7 @@ def setup_json_logger():
45
45
 
46
46
  if not 'SUCCESS' in logging._nameToLevel:
47
47
  add_log_level("SUCCESS",21)
48
- logger = logging.getLogger(__name__)
48
+ logger = logging.getLogger(nome)
49
49
  logger.setLevel(logging.INFO)
50
50
 
51
51
  # Remove handlers anteriores, se houver
@@ -78,7 +78,7 @@ def setup_json_logger():
78
78
  # Chama a função para configurar o logger
79
79
  #logger = setup_json_logger()
80
80
 
81
- def get_logger():
81
+ def get_logger(nome):
82
82
  """
83
83
  logger = logging.getLogger("my_json_logger")
84
84
  if not logger.hasHandlers(): # Evita configurar múltiplas vezes
@@ -88,5 +88,5 @@ def get_logger():
88
88
  logger.setLevel(logging.DEBUG)
89
89
  logger.addHandler(handler)
90
90
  """
91
- logger = setup_json_logger()
91
+ logger = setup_json_logger(nome)
92
92
  return logger
@@ -115,7 +115,7 @@ logger = logging.getLogger()
115
115
 
116
116
  """
117
117
 
118
- def get_logger():
118
+ def get_logger(nome):
119
119
  """
120
120
  Retorna um objeto logger configurado com base nas variáveis de ambiente.
121
121
  Returns:
@@ -238,7 +238,7 @@ def get_logger():
238
238
  if not 'SUCCESS' in logging._nameToLevel:
239
239
  add_log_level("SUCCESS",21)
240
240
 
241
- logger = logging.getLogger(__name__)
241
+ logger = logging.getLogger(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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: csc_cia_stne
3
- Version: 0.0.43
3
+ Version: 0.0.44
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
File without changes
File without changes
File without changes