rpa-suite 1.4.0__py3-none-any.whl → 1.4.1__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.
rpa_suite/__init__.py CHANGED
@@ -1,4 +1,59 @@
1
1
  # rpa_suite/__init__.py
2
+ """
3
+ RPA Suite is a Python module that provides a set of tools for process automation.
4
+
5
+ To use the module, import it as follows:
6
+ >>> from rpa_suite import rpa
7
+
8
+ Example of usage:
9
+ >>> from rpa_suite import rpa
10
+ >>> rpa.email.send_smtp(
11
+ ... email_user="your@email.com",
12
+ ... email_password="your_password",
13
+ ... email_to="destination@email.com",
14
+ ... subject_title="Test",
15
+ ... body_message="<p>Test message</p>"
16
+ ... )
17
+ >>> rpa.alert_print("Hello World")
18
+
19
+ Available modules:
20
+ ``clock``: Utilities for time and stopwatch manipulation
21
+ ``date``: Functions for date manipulation
22
+ ``email``: Functionalities for sending emails via SMTP
23
+ ``directory``: Operations with directories
24
+ ``file``: File manipulation
25
+ ``log``: Logging system
26
+ ``printer``: Functions for formatted output
27
+ ``regex``: Operations with regular expressions
28
+ ``validate``: Data validation functions
2
29
 
30
+ pt-br
31
+ -----
32
+ RPA Suite é um módulo Python que fornece um conjunto de ferramentas para automação de processos.
33
+
34
+ Para utilizar o módulo, importe-o da seguinte forma:
35
+ >>> from rpa_suite import rpa
36
+
37
+ Exemplo de uso:
38
+ >>> from rpa_suite import rpa
39
+ >>> rpa.email.send_smtp(
40
+ ... email_user="seu@email.com",
41
+ ... email_password="sua_senha",
42
+ ... email_to="destino@email.com",
43
+ ... subject_title="Teste",
44
+ ... body_message="<p>Mensagem de teste</p>"
45
+ ... )
46
+ >>> rpa.alert_print("Hello World")
47
+
48
+ Módulos disponíveis:
49
+ ``clock``: Utilitários para manipulação de tempo e cronômetro
50
+ ``date``: Funções para manipulação de datas
51
+ ``email``: Funcionalidades para envio de emails via SMTP
52
+ ``directory``: Operações com diretórios
53
+ ``file``: Manipulação de arquivos
54
+ ``log``: Sistema de logging
55
+ ``printer``: Funções para output formatado
56
+ ``regex``: Operações com expressões regulares
57
+ ``validate``: Funções de validação de dados
58
+ """
3
59
  from .suite import Suite as rpa
4
- rpa = rpa()
rpa_suite/core/clock.py CHANGED
@@ -7,7 +7,37 @@ from typing import Callable, Any
7
7
 
8
8
 
9
9
  class Clock():
10
+ """
11
+ Class that provides utilities for time manipulation and stopwatch.
12
+
13
+ This class offers functionalities for:
14
+ - Timed function execution
15
+ - Execution time control
16
+ - Task scheduling
17
+
18
+ Methods:
19
+ exec_at_hour: Executes a function at a specific time
20
+
21
+ The Clock class is part of RPA Suite and can be accessed through the rpa object:
22
+ >>> from rpa_suite import rpa
23
+ >>> rpa.clock.exec_at_hour("14:30", my_function)
10
24
 
25
+ pt-br
26
+ ----------
27
+ Classe que fornece utilitários para manipulação de tempo e cronômetro.
28
+
29
+ Esta classe oferece funcionalidades para:
30
+ - Execução temporizada de funções
31
+ - Controle de tempo de execução
32
+ - Agendamento de tarefas
33
+
34
+ Métodos:
35
+ exec_at_hour: Executa uma função em um horário específico
36
+
37
+ A classe Clock é parte do RPA Suite e pode ser acessada através do objeto rpa:
38
+ >>> from rpa_suite import rpa
39
+ >>> rpa.clock.exec_at_hour("14:30", minha_funcao)
40
+ """
11
41
  def __init__(self):
12
42
  ...
13
43
 
rpa_suite/core/date.py CHANGED
@@ -6,7 +6,37 @@ from typing import Tuple
6
6
  from rpa_suite.functions._printer import error_print
7
7
 
8
8
  class Date():
9
+ """
10
+ Class that provides utilities for date manipulation and formatting.
9
11
 
12
+ This class offers functionalities for:
13
+ - Getting current time components (hours, minutes, seconds)
14
+ - Date formatting and manipulation
15
+ - Date validation and conversion
16
+
17
+ Methods:
18
+ get_hms: Returns current time as tuple of hour, minute, second
19
+
20
+ The Date class is part of RPA Suite and can be accessed through the rpa object:
21
+ >>> from rpa_suite import rpa
22
+ >>> hour, minute, second = rpa.date.get_hms()
23
+
24
+ pt-br
25
+ ----------
26
+ Classe que fornece utilitários para manipulação e formatação de datas.
27
+
28
+ Esta classe oferece funcionalidades para:
29
+ - Obtenção de componentes do tempo atual (horas, minutos, segundos)
30
+ - Formatação e manipulação de datas
31
+ - Validação e conversão de datas
32
+
33
+ Métodos:
34
+ get_hms: Retorna o horário atual como tupla de hora, minuto, segundo
35
+
36
+ A classe Date é parte do RPA Suite e pode ser acessada através do objeto rpa:
37
+ >>> from rpa_suite import rpa
38
+ >>> hora, minuto, segundo = rpa.date.get_hms()
39
+ """
10
40
  def __init__(self):
11
41
  ...
12
42
 
rpa_suite/core/dir.py CHANGED
@@ -5,7 +5,49 @@ from rpa_suite.functions._printer import error_print, alert_print, success_print
5
5
 
6
6
 
7
7
  class Directory():
8
-
8
+
9
+ """
10
+ Class that provides utilities for directory management, including creating, deleting, and manipulating directories.
11
+
12
+ This class offers functionalities for:
13
+ - Creating temporary directories
14
+ - Deleting directories
15
+ - Checking if a directory exists
16
+ - Listing files in a directory
17
+
18
+ Methods:
19
+ create_temp_dir: Creates a temporary directory for file operations.
20
+
21
+ The Directory class is part of RPA Suite and can be accessed through the rpa object:
22
+ >>> from rpa_suite import rpa
23
+ >>> rpa.directory.create_temp_dir(path_to_create='my_folder', name_temp_dir='temp_dir')
24
+
25
+ Parameters:
26
+ path_to_create (str): The full path where the temporary directory should be created. Default is 'default', which creates it in the current directory.
27
+ name_temp_dir (str): The name of the temporary directory to be created. Default is 'temp'.
28
+
29
+ pt-br
30
+ ----------
31
+ Classe que fornece utilitários para gerenciamento de diretórios, incluindo criação, exclusão e manipulação de diretórios.
32
+
33
+ Esta classe oferece funcionalidades para:
34
+ - Criar diretórios temporários
35
+ - Excluir diretórios
36
+ - Verificar se um diretório existe
37
+ - Listar arquivos em um diretório
38
+
39
+ Métodos:
40
+ create_temp_dir: Cria um diretório temporário para operações com arquivos.
41
+
42
+ A classe Directory é parte do RPA Suite e pode ser acessada através do objeto rpa:
43
+ >>> from rpa_suite import rpa
44
+ >>> rpa.directory.create_temp_dir(path_to_create='minha_pasta', name_temp_dir='temp_dir')
45
+
46
+ Parâmetros:
47
+ path_to_create (str): O caminho completo onde o diretório temporário deve ser criado. O padrão é 'default', que o cria no diretório atual.
48
+ name_temp_dir (str): O nome do diretório temporário a ser criado. O padrão é 'temp'.
49
+ """
50
+
9
51
  def __init__(self):
10
52
  ...
11
53
 
rpa_suite/core/email.py CHANGED
@@ -12,6 +12,64 @@ from rpa_suite.core.validate import email_validator
12
12
 
13
13
  class Email():
14
14
 
15
+ """
16
+ Class that provides utilities for sending emails via SMTP protocol.
17
+
18
+ This class offers functionalities for:
19
+ - Sending emails with attachments
20
+ - HTML message formatting
21
+ - SMTP server configuration
22
+ - Email validation
23
+
24
+ Methods:
25
+ send_smtp: Sends an email through specified SMTP server
26
+
27
+ The Email class is part of RPA Suite and can be accessed through the rpa object:
28
+ >>> from rpa_suite import rpa
29
+ >>> rpa.email.send_smtp(
30
+ ... email_user="your@email.com",
31
+ ... email_password="your_password",
32
+ ... email_to="destination@email.com",
33
+ ... subject_title="Test",
34
+ ... body_message="<p>Test message</p>"
35
+ ... )
36
+
37
+ Parameters:
38
+ smtp_server (str): SMTP server address
39
+ smtp_port (str): SMTP server port
40
+ email_user (str): Email for SMTP authentication
41
+ email_password (str): Password for SMTP authentication
42
+ email_to (str): Recipient email address
43
+ attachments (list[str]): List of file paths to attach
44
+ subject_title (str): Email subject
45
+ body_message (str): Email body in HTML format
46
+ auth_tls (bool): Whether to use TLS authentication
47
+
48
+ pt-br
49
+ ----------
50
+ Classe que fornece utilitários para envio de emails via protocolo SMTP.
51
+
52
+ Esta classe oferece funcionalidades para:
53
+ - Envio de emails com anexos
54
+ - Formatação de mensagens em HTML
55
+ - Configuração de servidor SMTP
56
+ - Validação de email
57
+
58
+ Métodos:
59
+ send_smtp: Envia um email através do servidor SMTP especificado
60
+
61
+ A classe Email é parte do RPA Suite e pode ser acessada através do objeto rpa:
62
+ >>> from rpa_suite import rpa
63
+ >>> rpa.email.send_smtp(
64
+ ... email_user="seu@email.com",
65
+ ... email_password="sua_senha",
66
+ ... email_to="destino@email.com",
67
+ ... subject_title="Teste",
68
+ ... body_message="<p>Mensagem de teste</p>"
69
+ ... )
70
+ """
71
+
72
+
15
73
  smtp_server:str = "smtp.hostinger.com",
16
74
  smtp_port:str = 465,
17
75
  email_user:str = "your_email@email.com",
@@ -22,6 +80,7 @@ class Email():
22
80
  body_message: str = '<p>Testing message body</p>'
23
81
  auth_tls: bool = False,
24
82
 
83
+
25
84
  def __init__(self):
26
85
  ...
27
86
 
rpa_suite/core/file.py CHANGED
@@ -6,7 +6,55 @@ from colorama import Fore
6
6
  from typing import Dict, List, Union
7
7
 
8
8
  class File():
9
-
9
+ """
10
+ Class that provides utilities for file management, including creating, deleting, and manipulating files.
11
+
12
+ This class offers functionalities for:
13
+ - Creating files
14
+ - Deleting files
15
+ - Reading and writing file content
16
+ - File path management
17
+
18
+ Methods:
19
+ create_file: Creates a new file with specified content
20
+ delete_file: Deletes a specified file
21
+ read_file: Reads content from a specified file
22
+ write_file: Writes content to a specified file
23
+
24
+ The File class is part of RPA Suite and can be accessed through the rpa object:
25
+ >>> from rpa_suite import rpa
26
+ >>> rpa.file.create_file('example.txt', 'Hello, World!')
27
+
28
+ Parameters:
29
+ file_name (str): The name of the file to be created or manipulated
30
+ content (str): The content to be written to the file
31
+ path (str): The directory path where the file should be created or deleted
32
+
33
+ pt-br
34
+ ----------
35
+ Classe que fornece utilitários para gerenciamento de arquivos, incluindo criação, exclusão e manipulação de arquivos.
36
+
37
+ Esta classe oferece funcionalidades para:
38
+ - Criar arquivos
39
+ - Excluir arquivos
40
+ - Ler e escrever conteúdo de arquivos
41
+ - Gerenciamento de caminhos de arquivos
42
+
43
+ Métodos:
44
+ create_file: Cria um novo arquivo com o conteúdo especificado
45
+ delete_file: Exclui um arquivo especificado
46
+ read_file: Lê o conteúdo de um arquivo especificado
47
+ write_file: Escreve conteúdo em um arquivo especificado
48
+
49
+ A classe File é parte do RPA Suite e pode ser acessada através do objeto rpa:
50
+ >>> from rpa_suite import rpa
51
+ >>> rpa.file.create_file('exemplo.txt', 'Olá, Mundo!')
52
+
53
+ Parâmetros:
54
+ file_name (str): O nome do arquivo a ser criado ou manipulado
55
+ content (str): O conteúdo a ser escrito no arquivo
56
+ path (str): O caminho do diretório onde o arquivo deve ser criado ou excluído
57
+ """
10
58
  def __init__(self):
11
59
  self.__create_ss_dir = create_ss_dir
12
60
 
rpa_suite/core/log.py CHANGED
@@ -6,6 +6,38 @@ import sys, os, inspect
6
6
 
7
7
 
8
8
  class Filters():
9
+ """
10
+ Class that provides utilities for filtering log messages based on specific keywords.
11
+
12
+ This class allows you to define a list of words that, if found in a log message, will trigger a modification of that message.
13
+ The modified message will indicate that it has been altered due to the presence of a filtered word.
14
+
15
+ Methods:
16
+ __call__: Checks if any of the specified words are present in the log message and alters the message if a match is found.
17
+
18
+ Example:
19
+ >>> filter = Filters()
20
+ >>> filter.word_filter = ['error', 'warning']
21
+ >>> record = {"message": "This is an error message."}
22
+ >>> filter(record) # This will alter the message to 'Log Alterado devido a palavra Filtrada!'
23
+
24
+ pt-br
25
+ ----------
26
+ Classe que fornece utilitários para filtrar mensagens de log com base em palavras-chave específicas.
27
+
28
+ Esta classe permite que você defina uma lista de palavras que, se encontradas em uma mensagem de log, acionarão uma modificação dessa mensagem.
29
+ A mensagem modificada indicará que foi alterada devido à presença de uma palavra filtrada.
30
+
31
+ Métodos:
32
+ __call__: Verifica se alguma das palavras especificadas está presente na mensagem de log e altera a mensagem se uma correspondência for encontrada.
33
+
34
+ Exemplo:
35
+ >>> filtro = Filters()
36
+ >>> filtro.word_filter = ['erro', 'aviso']
37
+ >>> registro = {"message": "Esta é uma mensagem de erro."}
38
+ >>> filtro(registro) # Isso alterará a mensagem para 'Log Alterado devido a palavra Filtrada!'
39
+ """
40
+
9
41
  word_filter: Op[list[str]]
10
42
 
11
43
  def __call__(self, record):
@@ -25,6 +57,35 @@ class Filters():
25
57
 
26
58
 
27
59
  class CustomHandler():
60
+ """
61
+ Class that provides a custom logging handler to manage log messages.
62
+
63
+ This class allows for the formatting and writing of log messages to a specified output.
64
+ It utilizes a custom formatter to structure the log messages, including details such as
65
+ the time of logging, log level, and the message itself.
66
+
67
+ Methods:
68
+ write: Writes the formatted log message to the output.
69
+
70
+ Example:
71
+ >>> handler = CustomHandler(formatter=CustomFormatter())
72
+ >>> handler.write({"time": "12:00", "level": "INFO", "message": "This is a log message."})
73
+
74
+ pt-br
75
+ ----------
76
+ Classe que fornece um manipulador de log personalizado para gerenciar mensagens de log.
77
+
78
+ Esta classe permite a formatação e escrita de mensagens de log em uma saída especificada.
79
+ Ela utiliza um formatador personalizado para estruturar as mensagens de log, incluindo detalhes como
80
+ o horário do log, nível de log e a própria mensagem.
81
+
82
+ Métodos:
83
+ write: Escreve a mensagem de log formatada na saída.
84
+
85
+ Exemplo:
86
+ >>> manipulador = CustomHandler(formatter=CustomFormatter())
87
+ >>> manipulador.write({"time": "12:00", "level": "INFO", "message": "Esta é uma mensagem de log."})
88
+ """
28
89
  def __init__(self, formatter):
29
90
  self.formatter = formatter
30
91
 
@@ -35,6 +96,47 @@ class CustomHandler():
35
96
 
36
97
 
37
98
  class CustomFormatter:
99
+ """
100
+ Class that provides a custom formatter for log messages.
101
+
102
+ This class is responsible for formatting log messages in a structured way,
103
+ allowing for easy readability and understanding of log entries. It formats
104
+ the log messages to include details such as the time of logging, log level,
105
+ the filename, line number, and the actual log message.
106
+
107
+ Methods:
108
+ format: Formats the log message based on the provided record.
109
+
110
+ Example:
111
+ >>> formatter = CustomFormatter()
112
+ >>> log_message = formatter.format({
113
+ ... "time": "12:00",
114
+ ... "level": "INFO",
115
+ ... "message": "This is a log message."
116
+ ... })
117
+ >>> print(log_message)
118
+
119
+ pt-br
120
+ ----------
121
+ Classe que fornece um formatador personalizado para mensagens de log.
122
+
123
+ Esta classe é responsável por formatar mensagens de log de maneira estruturada,
124
+ permitindo fácil leitura e compreensão das entradas de log. Ela formata
125
+ as mensagens de log para incluir detalhes como o horário do log, nível de log,
126
+ o nome do arquivo, número da linha e a mensagem de log real.
127
+
128
+ Métodos:
129
+ format: Formata a mensagem de log com base no registro fornecido.
130
+
131
+ Exemplo:
132
+ >>> formatador = CustomFormatter()
133
+ >>> mensagem_log = formatador.format({
134
+ ... "time": "12:00",
135
+ ... "level": "INFO",
136
+ ... "message": "Esta é uma mensagem de log."
137
+ ... })
138
+ >>> print(mensagem_log)
139
+ """
38
140
  def format(self, record):
39
141
 
40
142
  frame = inspect.currentframe().f_back
@@ -64,6 +166,36 @@ class CustomFormatter:
64
166
 
65
167
 
66
168
  class Log():
169
+
170
+ """
171
+ Class that provides utilities for logging messages in a structured manner.
172
+
173
+ This class is responsible for managing log entries, allowing for easy tracking
174
+ and debugging of application behavior. It supports various logging levels and
175
+ can be configured to log messages to different outputs, such as files or the console.
176
+
177
+ Methods:
178
+ config_logger: Configures the logger with specified parameters.
179
+
180
+ Example:
181
+ >>> logger = Log()
182
+ >>> logger.config_logger(path_dir='logs', name_log_dir='my_logs', name_file_log='app_log')
183
+
184
+ pt-br
185
+ ----------
186
+ Classe que fornece utilitários para registrar mensagens de forma estruturada.
187
+
188
+ Esta classe é responsável por gerenciar entradas de log, permitindo fácil rastreamento
189
+ e depuração do comportamento da aplicação. Suporta vários níveis de log e
190
+ pode ser configurada para registrar mensagens em diferentes saídas, como arquivos ou console.
191
+
192
+ Métodos:
193
+ config_logger: Configura o logger com parâmetros especificados.
194
+
195
+ Exemplo:
196
+ >>> logger = Log()
197
+ >>> logger.config_logger(path_dir='logs', name_log_dir='meus_logs', name_file_log='log_app')
198
+ """
67
199
 
68
200
  filters: Filters
69
201
  custom_handler: CustomHandler
@@ -81,6 +213,10 @@ class Log():
81
213
  filter_words: list[str] = None):
82
214
 
83
215
  """
216
+ Função responsável por criar um objeto logger com fileHandler e streamHandler
217
+
218
+ pt-br
219
+ ----------
84
220
  Function responsible for create a object logger with fileHandler and streamHandler
85
221
  """
86
222
 
@@ -133,6 +269,10 @@ class Log():
133
269
 
134
270
  """
135
271
  Function responsable to generate ``start run log level debug``, in file and print on terminal the same log captured on this call.
272
+
273
+ pt-br
274
+ ----------
275
+ Função responsável por gerar o nível de log ``início execução nível debug``, em arquivo e imprimir no terminal o mesmo log capturado nesta chamada.
136
276
  """
137
277
 
138
278
  file_h: False
@@ -178,6 +318,10 @@ class Log():
178
318
 
179
319
  """
180
320
  Function responsable to generate log level ``debug``, in file and print on terminal the same log captured on this call.
321
+
322
+ pt-br
323
+ -----
324
+ Função responsável por gerar o nível de log ``debug``, em arquivo e imprimir no terminal o mesmo log capturado nesta chamada.
181
325
  """
182
326
 
183
327
  try:
@@ -204,6 +348,10 @@ class Log():
204
348
 
205
349
  """
206
350
  Function responsable to generate log level ``info``, in file and print on terminal the same log captured on this call.
351
+
352
+ pt-br
353
+ -----
354
+ Função responsável por gerar o nível de log ``info``, em arquivo e imprimir no terminal o mesmo log capturado nesta chamada.
207
355
  """
208
356
 
209
357
  try:
@@ -229,6 +377,10 @@ class Log():
229
377
 
230
378
  """
231
379
  Function responsable to generate log level ``warning``, in file and print on terminal the same log captured on this call.
380
+
381
+ pt-br
382
+ -----
383
+ Função responsável por gerar o nível de log ``aviso``, em arquivo e imprimir no terminal o mesmo log capturado nesta chamada.
232
384
  """
233
385
 
234
386
  try:
@@ -256,6 +408,10 @@ class Log():
256
408
 
257
409
  """
258
410
  Function responsable to generate log level ``error``, in file and print on terminal the same log captured on this call.
411
+
412
+ pt-br
413
+ -----
414
+ Função responsável por gerar o nível de log ``erro``, em arquivo e imprimir no terminal o mesmo log capturado nesta chamada.
259
415
  """
260
416
 
261
417
  try:
@@ -282,6 +438,11 @@ class Log():
282
438
 
283
439
  """
284
440
  Function responsable to generate log level ``critical``, in file and print on terminal the same log captured on this call.
441
+
442
+ pt-br
443
+ ----------
444
+
445
+ Função responsável por gerar o nível de log ``crítico``, em arquivo e imprimir no terminal o mesmo log capturado nesta chamada.
285
446
  """
286
447
 
287
448
  try:
rpa_suite/core/print.py CHANGED
@@ -19,6 +19,38 @@ class Colors():
19
19
 
20
20
  class Print():
21
21
 
22
+ """
23
+ Class that provides methods for formatted printing in the console, allowing for different types of messages to be displayed with specific colors.
24
+
25
+ This class offers functionalities for:
26
+ - Printing success messages in green
27
+ - Printing alert messages in yellow
28
+ - Additional printing methods can be added for other message types
29
+
30
+ The Print class is part of the RPA Suite and can be used to enhance the visibility of console outputs.
31
+
32
+ Example:
33
+ ----------
34
+ >>> from rpa_suite import rpa
35
+ >>> rpa.alert_print('Hello World')
36
+
37
+ pt-br
38
+ ----
39
+
40
+ Classe que fornece métodos para impressão formatada no console, permitindo que diferentes tipos de mensagens sejam exibidas com cores específicas.
41
+
42
+ Esta classe oferece funcionalidades para:
43
+ - Imprimir mensagens de sucesso em verde
44
+ - Imprimir mensagens de alerta em amarelo
45
+ - Métodos de impressão adicionais podem ser adicionados para outros tipos de mensagens
46
+
47
+ A classe Print é parte do RPA Suite e pode ser usada para aumentar a visibilidade das saídas do console.
48
+
49
+ Exemplo de uso:
50
+ ----------
51
+ >>> from rpa_suite import rpa
52
+ >>> rpa.alert_print('Hello World')
53
+ """
22
54
  colors: Colors = Colors
23
55
 
24
56
  def __init__(self):
rpa_suite/core/regex.py CHANGED
@@ -3,7 +3,25 @@ import re
3
3
  from rpa_suite.functions._printer import error_print, success_print
4
4
 
5
5
  class Regex():
6
-
6
+ """
7
+ Class that provides utilities for working with regular expressions.
8
+
9
+ This class offers functionalities for:
10
+ - Searching for patterns in text
11
+ - Validating strings against specific patterns
12
+
13
+ The Regex class is part of the RPA Suite and can be used to enhance text processing capabilities.
14
+
15
+ pt-br
16
+ ----------
17
+ Classe que fornece utilitários para trabalhar com expressões regulares.
18
+
19
+ Esta classe oferece funcionalidades para:
20
+ - Buscar padrões em texto
21
+ - Validar strings contra padrões específicos
22
+
23
+ A classe Regex é parte do RPA Suite e pode ser usada para aprimorar as capacidades de processamento de texto.
24
+ """
7
25
  def __init__(self):
8
26
  ...
9
27
 
@@ -5,7 +5,29 @@ from rpa_suite.functions._printer import error_print, success_print
5
5
 
6
6
 
7
7
  class Validate():
8
-
8
+
9
+ """
10
+ Class responsible for validating email addresses and searching for words within text.
11
+
12
+ This class offers functionalities to:
13
+ - Validate a list of emails, checking if each one complies with email formatting standards.
14
+ - Search for specific words or patterns within a given text, providing information about their occurrences.
15
+ - Return a dictionary with information about the validity of the emails, including lists of valid and invalid emails, as well as counts for each category.
16
+
17
+ The class uses the email_validator library to perform rigorous validation of email addresses, ensuring that the provided data is correct and ready for use in applications that require email communication. Additionally, it provides methods for searching words in text, enhancing its utility for text processing.
18
+
19
+ pt-br
20
+ ----
21
+ Classe responsável pela validação de endereços de e-mail e pela busca de palavras dentro de textos.
22
+
23
+ Esta classe oferece funcionalidades para:
24
+ - Validar uma lista de e-mails, verificando se cada um deles está em conformidade com os padrões de formatação de e-mail.
25
+ - Buscar palavras ou padrões específicos dentro de um texto fornecido, fornecendo informações sobre suas ocorrências.
26
+ - Retornar um dicionário com informações sobre a validade dos e-mails, incluindo listas de e-mails válidos e inválidos, bem como contagens de cada categoria.
27
+
28
+ A classe utiliza a biblioteca email_validator para realizar a validação rigorosa dos endereços de e-mail, garantindo que os dados fornecidos estejam corretos e prontos para uso em aplicações que requerem comunicação via e-mail. Além disso, fornece métodos para busca de palavras em textos, aumentando sua utilidade para o processamento de texto.
29
+ """
30
+
9
31
  def __init__(self):
10
32
  ...
11
33
 
rpa_suite/suite.py CHANGED
@@ -11,6 +11,44 @@ from colorama import Fore
11
11
 
12
12
  # Windows bash colors
13
13
  class Colors():
14
+
15
+ """
16
+ This class provides color constants based on the colorama library,
17
+ allowing for visual formatting of texts in the Windows terminal.
18
+
19
+ Attributes:
20
+ black (str): Black color
21
+ blue (str): Blue color
22
+ green (str): Green color
23
+ cyan (str): Cyan color
24
+ red (str): Red color
25
+ magenta (str): Magenta color
26
+ yellow (str): Yellow color
27
+ white (str): White color
28
+ default (str): Default color (white)
29
+ call_fn (str): Light magenta color (used for function calls)
30
+ retur_fn (str): Light yellow color (used for function returns)
31
+
32
+ pt-br
33
+ ------
34
+
35
+ Esta classe fornece constantes de cores baseadas na biblioteca colorama,
36
+ permitindo a formatação visual de textos no terminal Windows.
37
+
38
+ Atributos:
39
+ black (str): Cor preta
40
+ blue (str): Cor azul
41
+ green (str): Cor verde
42
+ cyan (str): Cor ciano
43
+ red (str): Cor vermelha
44
+ magenta (str): Cor magenta
45
+ yellow (str): Cor amarela
46
+ white (str): Cor branca
47
+ default (str): Cor padrão (branca)
48
+ call_fn (str): Cor magenta clara (usada para chamadas de função)
49
+ retur_fn (str): Cor amarela clara (usada para retornos de função)
50
+ """
51
+
14
52
  black = f'{Fore.BLACK}'
15
53
  blue = f'{Fore.BLUE}'
16
54
  green = f'{Fore.GREEN}'
@@ -24,6 +62,64 @@ class Colors():
24
62
  retur_fn = f'{Fore.LIGHTYELLOW_EX}'
25
63
 
26
64
  class Suite():
65
+
66
+ """
67
+ RPA Suite is a Python module that provides a set of tools for process automation.
68
+
69
+ To use the module, import it as follows:
70
+ >>> from rpa_suite import rpa
71
+
72
+ Example of usage:
73
+ >>> from rpa_suite import rpa
74
+ >>> rpa.email.send_smtp(
75
+ ... email_user="your@email.com",
76
+ ... email_password="your_password",
77
+ ... email_to="destination@email.com",
78
+ ... subject_title="Test",
79
+ ... body_message="<p>Test message</p>"
80
+ ... )
81
+ >>> rpa.alert_print("Hello World")
82
+
83
+ Available modules:
84
+ ``clock``: Utilities for time and stopwatch manipulation
85
+ ``date``: Functions for date manipulation
86
+ ``email``: Functionalities for sending emails via SMTP
87
+ ``directory``: Operations with directories
88
+ ``file``: File manipulation
89
+ ``log``: Logging system
90
+ ``printer``: Functions for formatted output
91
+ ``regex``: Operations with regular expressions
92
+ ``validate``: Data validation functions
93
+
94
+ pt-br
95
+ -----
96
+ RPA Suite é um módulo Python que fornece um conjunto de ferramentas para automação de processos.
97
+
98
+ Para utilizar o módulo, importe-o da seguinte forma:
99
+ >>> from rpa_suite import rpa
100
+
101
+ Exemplo de uso:
102
+ >>> from rpa_suite import rpa
103
+ >>> rpa.email.send_smtp(
104
+ ... email_user="seu@email.com",
105
+ ... email_password="sua_senha",
106
+ ... email_to="destino@email.com",
107
+ ... subject_title="Teste",
108
+ ... body_message="<p>Mensagem de teste</p>"
109
+ ... )
110
+ >>> rpa.alert_print("Hello World")
111
+
112
+ Módulos disponíveis:
113
+ ``clock``: Utilitários para manipulação de tempo e cronômetro
114
+ ``date``: Funções para manipulação de datas
115
+ ``email``: Funcionalidades para envio de emails via SMTP
116
+ ``directory``: Operações com diretórios
117
+ ``file``: Manipulação de arquivos
118
+ ``log``: Sistema de logging
119
+ ``printer``: Funções para output formatado
120
+ ``regex``: Operações com expressões regulares
121
+ ``validate``: Funções de validação de dados
122
+ """
27
123
 
28
124
  clock: Clock = Clock()
29
125
  date: Date = Date()
@@ -37,7 +133,9 @@ class Suite():
37
133
 
38
134
  def __init__(self):
39
135
  ...
40
-
136
+
137
+
138
+
41
139
  def success_print(self,
42
140
  string_text: str,
43
141
  color=Colors.green,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rpa_suite
3
- Version: 1.4.0
3
+ Version: 1.4.1
4
4
  Summary: Conjunto de ferramentas essenciais para Automação RPA com Python, que facilitam o dia a dia de desenvolvimento.
5
5
  Author: Camilo Costa de Carvalho
6
6
  Author-email: camilo.carvalho@triasoftware.com.br
@@ -186,7 +186,7 @@ Lançamento: *20/02/2024*
186
186
 
187
187
  Status: Em desenvolvimento.
188
188
 
189
- ### Notas da atualização: 1.4.0
189
+ ### Notas da atualização: 1.4.1
190
190
 
191
191
  - Correções de bugs em diversas funções relacionadas a tempo: *exec_at_hour* , *wait_for_exec* , *exec_and_wait*
192
192
  - Correções de bugs com tempo superior a 10 minutos nas funções de data: *get_hms* e *get_dma*
@@ -0,0 +1,25 @@
1
+ rpa_suite/__init__.py,sha256=FltmvZSoiSq67rk1Oq1dMdrO-lOgHDidhkF7WPm4ybE,2297
2
+ rpa_suite/suite.py,sha256=nZxXonIVFNdJo7EFoCfhc7lZA_svz0DBoApeca_bDCo,10120
3
+ rpa_suite/core/__init__.py,sha256=VROMsrhKGMqUlstH8cEqp5fwRVC12d3U3_XoxoKOzyg,28
4
+ rpa_suite/core/clock.py,sha256=DlKSSG9W0SG4mtpbmxh3-OMsSBg8ZqMyn9gBxEF-tvI,13799
5
+ rpa_suite/core/date.py,sha256=PBU999Acxiwoep029ElqKSzK6T4DrF3eIP-LB_J-BbM,6568
6
+ rpa_suite/core/dir.py,sha256=y6YDyRYQdf9Bj0z3Gs6ugNZ0tKWYgWdDI5R5BjjRIEY,9783
7
+ rpa_suite/core/email.py,sha256=0bK70FSzsWhe2UvTHlnW_o9-c2rX7Beugr2kt2TXTwM,7429
8
+ rpa_suite/core/file.py,sha256=AdpktNTXvHTsRHhm0F1JdG7xDsYvRCv_6j2vZubxqss,10945
9
+ rpa_suite/core/log.py,sha256=cfnThg3cKCRZ4InXPSThKNVuHbN6c06l3wilU0NuDck,17802
10
+ rpa_suite/core/print.py,sha256=tLHIKo6LDTrV91gWKvwlTrxb1idgx3EV_fIRkqtzWBM,6389
11
+ rpa_suite/core/regex.py,sha256=wsTxe8-baKul2Fv1-fycXZ-DVa5krhkc9qMkP04giGs,3303
12
+ rpa_suite/core/validate.py,sha256=0HnCUgT19LPBMhKxIV_hOAoixpqM7TAL9EkC0S56DFc,10976
13
+ rpa_suite/functions/__create_log_dir.py,sha256=-NjH3Mwv8Aa0EgZiD_TcdlSKbsoYl5EoYmPclFwjTKY,3325
14
+ rpa_suite/functions/__create_ss_dir.py,sha256=WMuDDTxM5xWudQjftC7xPr6y3IdiXjVK-GfxkQNIo4c,3377
15
+ rpa_suite/functions/__init__.py,sha256=aa0jejVvnghufR50owKcKpmYit7XVAliyN9gn9JkdLE,33
16
+ rpa_suite/functions/_functions_logger.py,sha256=hlYDEUsmmfwaPlY_YQeNQEFeT_mryHBqgBVyRdxge48,2703
17
+ rpa_suite/functions/_logger.py,sha256=gTYO9JlbX5_jDfu_4FTTajJw3_GotE2BHUbDDB1Hf5g,3643
18
+ rpa_suite/functions/_printer.py,sha256=r72zeobAi2baVbYgbfFH0h5-WMv4tSDGPNlcpZen7O0,3949
19
+ rpa_suite/functions/_variables.py,sha256=vCcktifFUriBQTyUaayZW8BlE8Gr7VP-tFbfomKOS5U,312
20
+ rpa_suite/functions/_variables_uru.py,sha256=xRqYp49l1fFNrHczOmJ6Pqw1PKIWs0f9kxlgvuYGYys,303
21
+ rpa_suite-1.4.1.dist-info/licenses/LICENSE,sha256=5D8PIbs31iGd9i1_MDNg4SzaQnp9sEIULALh2y3WyMI,1102
22
+ rpa_suite-1.4.1.dist-info/METADATA,sha256=gnpgfEeLIbREvsy37hvOwzPV5HzqZ0TbhAKM9zpqYT8,9351
23
+ rpa_suite-1.4.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
24
+ rpa_suite-1.4.1.dist-info/top_level.txt,sha256=HYkDtg-kJNAr3F2XAIPyJ-QBbNhk7q6jrqsFt10lz4Y,10
25
+ rpa_suite-1.4.1.dist-info/RECORD,,
@@ -1,25 +0,0 @@
1
- rpa_suite/__init__.py,sha256=a01Ua3RpUt57HOYjAoBdjOhnnGIexnVxDrBmRLWgJvo,71
2
- rpa_suite/suite.py,sha256=o5xxt4oIJhKFnFeeFnf-Lue19KZlBUcMRA_9Dyc615w,6550
3
- rpa_suite/core/__init__.py,sha256=VROMsrhKGMqUlstH8cEqp5fwRVC12d3U3_XoxoKOzyg,28
4
- rpa_suite/core/clock.py,sha256=qGF_fn0_n19WX4GLtzCrwrJmna9HtzfrhLYramOGZm8,12709
5
- rpa_suite/core/date.py,sha256=dgg-A5GL67MPFP5_0Ie61ymC9pCyDmoVgCJ10zzStrw,5363
6
- rpa_suite/core/dir.py,sha256=cwwvlPeXFEsoVFdu38Jsfw98t3CbshdS79m5D_y2txQ,7848
7
- rpa_suite/core/email.py,sha256=yW0x4rDjZZoJ5WDB4C4vWkp25MDfdGSlM9KepBxQV9I,5292
8
- rpa_suite/core/file.py,sha256=AgXmlyU_AiJ54sKwa8aTWyCjVUfuFhC9-0_m6U6zS7Y,8916
9
- rpa_suite/core/log.py,sha256=t5TEMHuWMkx9psbbeIyPy3VHs8MJDaSh1h0rdMaYnro,10841
10
- rpa_suite/core/print.py,sha256=PvEBm7TNNdZFa_qNX67i1JmPVToTBe7I1tQ73B17Onk,5122
11
- rpa_suite/core/regex.py,sha256=Q2FRI-aUB6oUXunK_0f9sc5kfbZt1qnZb4w7YbzST2o,2602
12
- rpa_suite/core/validate.py,sha256=J23xB_nXymPKR8eNJb844LJ2OETSPwFT8m2JawbTVz0,9134
13
- rpa_suite/functions/__create_log_dir.py,sha256=-NjH3Mwv8Aa0EgZiD_TcdlSKbsoYl5EoYmPclFwjTKY,3325
14
- rpa_suite/functions/__create_ss_dir.py,sha256=WMuDDTxM5xWudQjftC7xPr6y3IdiXjVK-GfxkQNIo4c,3377
15
- rpa_suite/functions/__init__.py,sha256=aa0jejVvnghufR50owKcKpmYit7XVAliyN9gn9JkdLE,33
16
- rpa_suite/functions/_functions_logger.py,sha256=hlYDEUsmmfwaPlY_YQeNQEFeT_mryHBqgBVyRdxge48,2703
17
- rpa_suite/functions/_logger.py,sha256=gTYO9JlbX5_jDfu_4FTTajJw3_GotE2BHUbDDB1Hf5g,3643
18
- rpa_suite/functions/_printer.py,sha256=r72zeobAi2baVbYgbfFH0h5-WMv4tSDGPNlcpZen7O0,3949
19
- rpa_suite/functions/_variables.py,sha256=vCcktifFUriBQTyUaayZW8BlE8Gr7VP-tFbfomKOS5U,312
20
- rpa_suite/functions/_variables_uru.py,sha256=xRqYp49l1fFNrHczOmJ6Pqw1PKIWs0f9kxlgvuYGYys,303
21
- rpa_suite-1.4.0.dist-info/licenses/LICENSE,sha256=5D8PIbs31iGd9i1_MDNg4SzaQnp9sEIULALh2y3WyMI,1102
22
- rpa_suite-1.4.0.dist-info/METADATA,sha256=1GclteyzCMHGQ-Hl7TS6yOtvcrOGHH8oEWSRdeaiZdo,9351
23
- rpa_suite-1.4.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
24
- rpa_suite-1.4.0.dist-info/top_level.txt,sha256=HYkDtg-kJNAr3F2XAIPyJ-QBbNhk7q6jrqsFt10lz4Y,10
25
- rpa_suite-1.4.0.dist-info/RECORD,,