csc-cia-stne 0.0.41__tar.gz → 0.0.42__tar.gz

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.
Files changed (35) hide show
  1. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/PKG-INFO +2 -2
  2. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/pyproject.toml +1 -1
  3. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/logger_json.py +2 -1
  4. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/logger_rich.py +2 -1
  5. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/slack.py +11 -11
  6. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne.egg-info/PKG-INFO +2 -2
  7. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/LICENCE +0 -0
  8. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/README.md +0 -0
  9. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/README_PYPI.md +0 -0
  10. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/setup.cfg +0 -0
  11. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/__init__.py +0 -0
  12. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/bc_correios.py +0 -0
  13. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/bc_sta.py +0 -0
  14. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/email.py +0 -0
  15. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/gcp_bigquery.py +0 -0
  16. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/google_drive.py +0 -0
  17. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/karavela.py +0 -0
  18. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/provio.py +0 -0
  19. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/servicenow.py +0 -0
  20. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/stne_admin.py +0 -0
  21. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/utilitarios/__init__.py +0 -0
  22. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/utilitarios/functions/__init__.py +0 -0
  23. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/utilitarios/functions/func_b64.py +0 -0
  24. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/utilitarios/functions/func_converters.py +0 -0
  25. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/utilitarios/functions/func_recriar_pastas.py +0 -0
  26. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/utilitarios/functions/func_settings.py +0 -0
  27. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/utilitarios/functions/func_titulo.py +0 -0
  28. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/utilitarios/validations/GcpBigQueryValidator.py +0 -0
  29. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/utilitarios/validations/GoogleDriveValidator.py +0 -0
  30. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/utilitarios/validations/ServiceNowValidator.py +0 -0
  31. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne/utilitarios/validations/__init__.py +0 -0
  32. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne.egg-info/SOURCES.txt +0 -0
  33. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne.egg-info/dependency_links.txt +0 -0
  34. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne.egg-info/requires.txt +0 -0
  35. {csc_cia_stne-0.0.41 → csc_cia_stne-0.0.42}/src/csc_cia_stne.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: csc_cia_stne
3
- Version: 0.0.41
3
+ Version: 0.0.42
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.41"
7
+ version = "0.0.42"
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"]
@@ -43,7 +43,8 @@ def setup_json_logger():
43
43
  setattr(logging.getLoggerClass(), method_name, log_for_level)
44
44
  setattr(logging, method_name, log_to_root)
45
45
 
46
- add_log_level("SUCCESS",21)
46
+ if not 'SUCCESS' in logging._nameToLevel:
47
+ add_log_level("SUCCESS",21)
47
48
  logger = logging.getLogger(__name__)
48
49
  logger.setLevel(logging.INFO)
49
50
 
@@ -234,7 +234,8 @@ def get_logger():
234
234
  setattr(logging.getLoggerClass(), method_name, log_for_level)
235
235
  setattr(logging, method_name, log_to_root)
236
236
 
237
- add_log_level("SUCCESS",21)
237
+ if not 'SUCCESS' in logging._nameToLevel:
238
+ add_log_level("SUCCESS",21)
238
239
 
239
240
  logger = logging.getLogger(__name__)
240
241
 
@@ -84,7 +84,7 @@ class SendSlackMessageParamsValidator(BaseModel):
84
84
 
85
85
  message:str
86
86
  highlights:list
87
- files:list
87
+ file_list:list
88
88
 
89
89
  @field_validator('message')
90
90
  def validate_message(cls, value, info):
@@ -92,7 +92,7 @@ class SendSlackMessageParamsValidator(BaseModel):
92
92
  raise ValueError(f"O campo '{info.field_name}' deve ser strings e não {type(value)}")
93
93
  return value
94
94
 
95
- @field_validator('highlights','files')
95
+ @field_validator('highlights','file_list')
96
96
  def validate_list(cls, value, info):
97
97
  if not isinstance(value, list):
98
98
  raise ValueError(f"O campo '{info.field_name}' deve ser strings e não {type(value)}")
@@ -129,7 +129,7 @@ class Slack():
129
129
  self.client = WebClient(self.token_slack)
130
130
 
131
131
 
132
- def send_message(self, message:str, highlights:list=[] , files:list=[]):
132
+ def send_message(self, message:str, highlights:list=[] , file_list:list=[]):
133
133
  """
134
134
  Envia uma mensagem para o canal do Slack.
135
135
  Parâmetros:
@@ -151,7 +151,7 @@ class Slack():
151
151
 
152
152
  try:
153
153
 
154
- SendSlackMessageParamsValidator(message=message, highlights=highlights, files=files)
154
+ SendSlackMessageParamsValidator(message=message, highlights=highlights, file_list=file_list)
155
155
 
156
156
  except ValidationError as e:
157
157
 
@@ -177,25 +177,25 @@ class Slack():
177
177
  attachments=highlights
178
178
  )
179
179
 
180
- if files is not None and len(files) > 0:
180
+ if file_list is not None and len(file_list) > 0:
181
181
 
182
182
  # validar os arquivos anexados
183
183
 
184
- for file in files:
184
+ for file_item in file_list:
185
185
 
186
- if 'title' in file and 'file' in file:
186
+ if 'title' in file_item and 'file' in file_item:
187
187
 
188
- if file['title'] is not None and len(str(file['title']).replace(" ","")) > 0 and file['file'] is not None and len(str(files['file']).replace(" ","")) > 0:
188
+ if file_item['title'] is not None and len(str(file_item['title']).replace(" ","")) > 0 and file_item['file'] is not None and len(str(file_item['file']).replace(" ","")) > 0:
189
189
 
190
- success_attachments.append(file)
190
+ success_attachments.append(file_item)
191
191
 
192
192
  else:
193
193
 
194
- failed_attachments.append(file)
194
+ failed_attachments.append(file_item)
195
195
 
196
196
  else:
197
197
 
198
- failed_attachments.append(file)
198
+ failed_attachments.append(file_item)
199
199
 
200
200
  if len(success_attachments) > 0:
201
201
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: csc_cia_stne
3
- Version: 0.0.41
3
+ Version: 0.0.42
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