rpa-suite 1.3.4__py3-none-any.whl → 1.3.6__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.
Files changed (48) hide show
  1. rpa_suite/__init__.py +4 -1
  2. rpa_suite/core/__init__.py +1 -0
  3. rpa_suite/core/clock.py +271 -0
  4. rpa_suite/core/date.py +138 -0
  5. rpa_suite/core/dir.py +182 -0
  6. rpa_suite/core/email.py +343 -0
  7. rpa_suite/core/file.py +209 -0
  8. rpa_suite/core/log.py +304 -0
  9. rpa_suite/core/print.py +197 -0
  10. rpa_suite/core/regex.py +62 -0
  11. rpa_suite/core/validate.py +220 -0
  12. rpa_suite/{log → functions}/__create_log_dir.py +5 -7
  13. rpa_suite/{file → functions}/__create_ss_dir.py +2 -2
  14. rpa_suite/functions/__init__.py +1 -0
  15. rpa_suite/{log → functions}/_functions_logger.py +8 -8
  16. rpa_suite/{log → functions}/_logger.py +3 -3
  17. rpa_suite/suite.py +238 -148
  18. {rpa_suite-1.3.4.dist-info → rpa_suite-1.3.6.dist-info}/METADATA +7 -4
  19. rpa_suite-1.3.6.dist-info/RECORD +25 -0
  20. rpa_suite/clock/__init__.py +0 -1
  21. rpa_suite/clock/exec_at.py +0 -133
  22. rpa_suite/clock/scheduler.py +0 -38
  23. rpa_suite/clock/waiter.py +0 -139
  24. rpa_suite/date/__init__.py +0 -1
  25. rpa_suite/date/date.py +0 -124
  26. rpa_suite/email/__init__.py +0 -1
  27. rpa_suite/email/sender_smtp.py +0 -203
  28. rpa_suite/file/__init__.py +0 -1
  29. rpa_suite/file/counter.py +0 -69
  30. rpa_suite/file/file_flag.py +0 -103
  31. rpa_suite/file/screen_shot.py +0 -91
  32. rpa_suite/file/temp_dir.py +0 -176
  33. rpa_suite/log/__init__.py +0 -1
  34. rpa_suite/log/functions_logger_uru.py +0 -172
  35. rpa_suite/log/log_decorator.py +0 -37
  36. rpa_suite/log/logger_uru.py +0 -110
  37. rpa_suite/regex/__init__.py +0 -1
  38. rpa_suite/regex/pattern_in_text.py +0 -58
  39. rpa_suite/validate/__init__.py +0 -1
  40. rpa_suite/validate/mail_validator.py +0 -93
  41. rpa_suite/validate/string_validator.py +0 -120
  42. rpa_suite-1.3.4.dist-info/RECORD +0 -36
  43. /rpa_suite/{log/printer.py → functions/_printer.py} +0 -0
  44. /rpa_suite/{log → functions}/_variables.py +0 -0
  45. /rpa_suite/{log → functions}/_variables_uru.py +0 -0
  46. {rpa_suite-1.3.4.dist-info → rpa_suite-1.3.6.dist-info}/WHEEL +0 -0
  47. {rpa_suite-1.3.4.dist-info → rpa_suite-1.3.6.dist-info}/licenses/LICENSE +0 -0
  48. {rpa_suite-1.3.4.dist-info → rpa_suite-1.3.6.dist-info}/top_level.txt +0 -0
@@ -1,93 +0,0 @@
1
- # /mail_validator.py
2
-
3
- import email_validator
4
- from rpa_suite.log.printer import error_print, success_print
5
-
6
- def valid_emails(
7
- email_list: list[str],
8
- display_message: bool = False,
9
- ) -> dict:
10
-
11
- """
12
- Function responsible for rigorously validating a list of emails using the email_validator library. \n
13
-
14
- Parameters:
15
- ------------
16
- ``email_list: list`` a list of strings containing the emails to be validated
17
-
18
- Return:
19
- ------------
20
- >>> type: dict
21
- Returns a dictionary with the respective data:
22
- * 'success': bool - represents if the list is 100% valid
23
- * 'valid_emails': list - list of valid emails
24
- * 'invalid_emails': list - list of invalid emails
25
- * 'qt_valids': int - number of valid emails
26
- * 'qt_invalids': int - number of invalid emails
27
- * 'map_validation' - map of the validation of each email
28
-
29
- Description: pt-br
30
- ----------
31
- Função responsavel por validar de forma rigorosa lista de emails usando a biblioteca email_validator. \n
32
-
33
- Paramentros:
34
- ------------
35
- ``email_list: list`` uma lista de strings contendo os emails a serem validados
36
-
37
- Retorno:
38
- ------------
39
- >>> type: dict
40
- Retorna um dicionário com os respectivos dados:
41
- * 'success': bool - representa se a lista é 100% valida
42
- * 'valid_emails': list - lista de emails validos
43
- * 'invalid_emails': list - lista de emails invalidos
44
- * 'qt_valids': int - quantidade de emails validos
45
- * 'qt_invalids': int - quantidade de emails invalidos
46
- * 'map_validation' - mapa da validação de cada email
47
- """
48
-
49
- # Local Variables
50
- result: dict = {
51
- 'success': bool,
52
- 'valid_emails': list,
53
- 'invalid_emails': list,
54
- 'qt_valids': int,
55
- 'qt_invalids': int,
56
- 'map_validation': list[dict]
57
- }
58
-
59
-
60
- # Preprocessing
61
- validated_emails: list = []
62
- invalid_emails: list = []
63
- map_validation: list[dict] = []
64
-
65
- # Process
66
- try:
67
- for email in email_list:
68
- try:
69
- v = email_validator.validate_email(email)
70
- validated_emails.append(email)
71
- map_validation.append(v)
72
-
73
- except email_validator.EmailNotValidError:
74
- invalid_emails.append(email)
75
-
76
- if display_message:
77
- success_print(f'Function:{valid_emails.__name__} executed!')
78
-
79
- except Exception as e:
80
- error_print(f'Error when trying to validate email list: {str(e)}')
81
-
82
-
83
- # Postprocessing
84
- result = {
85
- 'valid_emails': validated_emails,
86
- 'invalid_emails': invalid_emails,
87
- 'success': len(invalid_emails) == 0,
88
- 'qt_valids': len(validated_emails),
89
- 'qt_invalids': len(invalid_emails),
90
- 'map_validation': map_validation
91
- }
92
-
93
- return result
@@ -1,120 +0,0 @@
1
- # /string_validator.py
2
-
3
- from rpa_suite.log.printer import success_print, error_print
4
-
5
- def search_str_in(
6
- origin_text: str,
7
- searched_word: str,
8
- case_sensitivy: bool = True,
9
- search_by: str = 'string',
10
- ) -> dict:
11
-
12
- """
13
- Function responsible for searching for a string, substring or word within a provided text. \n
14
-
15
- Parameters:
16
- -----------
17
- ``origin_text: str`` \n
18
-
19
- * It is the text where the search should be made, in string format. \n
20
-
21
- ``search_by: str`` accepts the values: \n
22
-
23
- * 'string' - can find a requested writing excerpt. (default) \n
24
- * 'word' - finds only the word written out exclusively. \n
25
- * 'regex' - find regex patterns, [ UNDER DEVELOPMENT ...] \n
26
-
27
- Return:
28
- -----------
29
- >>> type:dict
30
- a dictionary with all information that may be necessary about the validation.
31
- Respectively being:
32
- * 'is_found': bool - if the pattern was found in at least one case
33
- * 'number_occurrences': int - represents the number of times this pattern was found
34
- * 'positions': list[set(int, int), ...] - represents all positions where the pattern appeared in the original text
35
-
36
- About `Positions`:
37
- -----------
38
- >>> type: list[set(int, int), ...]
39
- * at `index = 0` we find the first occurrence of the text, and the occurrence is composed of a PAIR of numbers in a set, the other indexes represent other positions where occurrences were found if any.
40
-
41
- Description: pt-br
42
- ----------
43
- Função responsavel por fazer busca de uma string, sbustring ou palavra dentro de um texto fornecido. \n
44
-
45
- Parametros:
46
- -----------
47
- ``origin_text: str`` \n
48
-
49
- * É o texto onde deve ser feita a busca, no formato string. \n
50
-
51
- ``search_by: str`` aceita os valores: \n
52
-
53
- * 'string' - consegue encontrar um trecho de escrita solicitado. (default) \n
54
- * 'word' - encontra apenas a palavra escrita por extenso exclusivamente. \n
55
- * 'regex' - encontrar padrões de regex, [ EM DESENVOLVIMENTO ...] \n
56
-
57
- Retorno:
58
- -----------
59
- >>> type:dict
60
- um dicionário com todas informações que podem ser necessarias sobre a validação.
61
- Sendo respectivamente:
62
- * 'is_found': bool - se o pattern foi encontrado em pelo menos um caso
63
- * 'number_occurrences': int - representa o número de vezes que esse pattern foi econtrado
64
- * 'positions': list[set(int, int), ...] - representa todas posições onde apareceu o pattern no texto original
65
-
66
- Sobre o `Positions`:
67
- -----------
68
- >>> type: list[set(int, int), ...]
69
- * no `index = 0` encontramos a primeira ocorrência do texto, e a ocorrência é composta por um PAR de números em um set, os demais indexes representam outras posições onde foram encontradas ocorrências caso hajam.
70
- """
71
-
72
- # Local Variables
73
- result: dict = {
74
- 'is_found': bool,
75
- 'number_occurrences': int,
76
- 'positions': list[set]
77
- }
78
-
79
- # Preprocessing
80
- result['is_found'] = False
81
- result['number_occurrences'] = 0
82
-
83
- # Process
84
- try:
85
- if search_by == 'word':
86
- origin_words = origin_text.split()
87
- try:
88
- if case_sensitivy:
89
- result['is_found'] = searched_word in origin_words
90
- else:
91
- words_lowercase = [word.lower() for word in origin_words]
92
- searched_word = searched_word.lower()
93
- result['is_found'] = searched_word in words_lowercase
94
-
95
- except Exception as e:
96
- return error_print(f'Unable to complete the search: {searched_word}. Error: {str(e)}')
97
-
98
- elif search_by == 'string':
99
- try:
100
- if case_sensitivy:
101
- result['is_found'] = origin_text.__contains__(searched_word)
102
- else:
103
- origin_text_lower: str = origin_text.lower()
104
- searched_word_lower: str = searched_word.lower()
105
- result['is_found'] = origin_text_lower.__contains__(searched_word_lower)
106
-
107
- except Exception as e:
108
- return error_print(f'Unable to complete the search: {searched_word}. Error: {str(e)}')
109
-
110
-
111
- except Exception as e:
112
- return error_print(f'Unable to search for: {searched_word}. Error: {str(e)}')
113
-
114
- # Postprocessing
115
- if result['is_found']:
116
- success_print(f'Function: {search_str_in.__name__} found: {result["number_occurrences"]} occurrences for "{searched_word}".')
117
- else:
118
- success_print(f'Function: {search_str_in.__name__} found no occurrences of "{searched_word}" during the search.')
119
-
120
- return result
@@ -1,36 +0,0 @@
1
- rpa_suite/__init__.py,sha256=2k_ZeqU7FvqZMFqGm-EYRiV98uxUxmiy5wXygvIobPU,13
2
- rpa_suite/suite.py,sha256=gR7g8LpBIm6dM75edFA8CQJ0nU1gsUAT6dRSla-MzD8,5488
3
- rpa_suite/clock/__init__.py,sha256=haPk94yjX88kR5YpzNNFCpzHw0T7fKAEoiaHA3-vAds,14
4
- rpa_suite/clock/exec_at.py,sha256=BbyndWv8FiGhpeCjd8AJvLdIPHsIlIetHQ59bjG818A,6066
5
- rpa_suite/clock/scheduler.py,sha256=_EeERPcdVakgp4WoAWbQvLUeLUtZeWiONuU--EszKvI,1197
6
- rpa_suite/clock/waiter.py,sha256=puvi1tNIG5v50tVaGckxjWjbTcnDQkpuxIZykRCi6s4,5916
7
- rpa_suite/date/__init__.py,sha256=haPk94yjX88kR5YpzNNFCpzHw0T7fKAEoiaHA3-vAds,14
8
- rpa_suite/date/date.py,sha256=i10Nu54cue8LtcpzqBISq1D4UVkApyDUhZwSxxXRVWw,4322
9
- rpa_suite/email/__init__.py,sha256=haPk94yjX88kR5YpzNNFCpzHw0T7fKAEoiaHA3-vAds,14
10
- rpa_suite/email/sender_smtp.py,sha256=td4LFdMUQB8YWeMPrw_6qrHPZaAIKr-37qqtynYzAZQ,8456
11
- rpa_suite/file/__create_ss_dir.py,sha256=hn98whvD9PBRFKEfyKG_OwFM2oQqzI_8ETMJa7XVho8,3370
12
- rpa_suite/file/__init__.py,sha256=haPk94yjX88kR5YpzNNFCpzHw0T7fKAEoiaHA3-vAds,14
13
- rpa_suite/file/counter.py,sha256=t5Ti_YnI-f-1CRv47T7HfhKYZPRmUQ-wmCvQ3wapncE,2523
14
- rpa_suite/file/file_flag.py,sha256=AcLgVlXLs8dNsKT9ivUOSMSB-tXNOk5Xe5wtfb5Orf0,4120
15
- rpa_suite/file/screen_shot.py,sha256=TWuBPbtUfWuNXkq4Ssbg8ncd4Ons7gtyXxo9qqnsHlw,3809
16
- rpa_suite/file/temp_dir.py,sha256=ly18bZMcPpFp1w8Sswn4fYchhdZ7CoqKeXWU1i74LyM,7212
17
- rpa_suite/log/__create_log_dir.py,sha256=wYhYMaGl75nrWRdCvdH4xpckWAkSChKNRgWohT3mlco,3275
18
- rpa_suite/log/__init__.py,sha256=haPk94yjX88kR5YpzNNFCpzHw0T7fKAEoiaHA3-vAds,14
19
- rpa_suite/log/_functions_logger.py,sha256=gJzSJUZ1HbI2JQJeZ-4U0qjufEPf9H0jhDbNcd0UWwU,2703
20
- rpa_suite/log/_logger.py,sha256=VEfdJTHDpOiHBwzSKC4p1fHJ0yUSIr3qm_hRCCp8Nko,3599
21
- rpa_suite/log/_variables.py,sha256=vCcktifFUriBQTyUaayZW8BlE8Gr7VP-tFbfomKOS5U,312
22
- rpa_suite/log/_variables_uru.py,sha256=xRqYp49l1fFNrHczOmJ6Pqw1PKIWs0f9kxlgvuYGYys,303
23
- rpa_suite/log/functions_logger_uru.py,sha256=LyYazyfXuhQ2iTnWKtkeumUA9o0f_Isyrb1T6D9TsFQ,6091
24
- rpa_suite/log/log_decorator.py,sha256=cSN-WINpdbtvH_bDNurpkbMLjQlDPJKdwou6T8JHo3g,1338
25
- rpa_suite/log/logger_uru.py,sha256=Z_lTY0diKuBjDc3KNdGAa5ryY4JtmH5F0R0DbosWv-o,3628
26
- rpa_suite/log/printer.py,sha256=r72zeobAi2baVbYgbfFH0h5-WMv4tSDGPNlcpZen7O0,3949
27
- rpa_suite/regex/__init__.py,sha256=haPk94yjX88kR5YpzNNFCpzHw0T7fKAEoiaHA3-vAds,14
28
- rpa_suite/regex/pattern_in_text.py,sha256=UvLm8IgkwTWkX6hCA2U4fR0fPHs0K9ws_quNjbj9oic,2289
29
- rpa_suite/validate/__init__.py,sha256=haPk94yjX88kR5YpzNNFCpzHw0T7fKAEoiaHA3-vAds,14
30
- rpa_suite/validate/mail_validator.py,sha256=LTvxXgyBMJxQ8DuMd8gA-6MT4UiWfj1R6Hh4Q56ID50,3035
31
- rpa_suite/validate/string_validator.py,sha256=kkPTUflSfX6CIRVWQ8WXUrEY-ccUQyRPgaBYPGTvfQ4,4989
32
- rpa_suite-1.3.4.dist-info/licenses/LICENSE,sha256=5D8PIbs31iGd9i1_MDNg4SzaQnp9sEIULALh2y3WyMI,1102
33
- rpa_suite-1.3.4.dist-info/METADATA,sha256=EbZvLf1gh3lo_WlTQx7q6Bd6A92XNgshmpCkgbRecwo,9279
34
- rpa_suite-1.3.4.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
35
- rpa_suite-1.3.4.dist-info/top_level.txt,sha256=HYkDtg-kJNAr3F2XAIPyJ-QBbNhk7q6jrqsFt10lz4Y,10
36
- rpa_suite-1.3.4.dist-info/RECORD,,
File without changes
File without changes
File without changes