rpa-suite 1.4.8__py3-none-any.whl → 1.5.0__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.
@@ -33,6 +33,7 @@ from .print import Print
33
33
  from .regex import Regex
34
34
  from .validate import Validate
35
35
  from .parallel import ParallelRunner
36
+ from .asyncrun import AsyncRunner
36
37
 
37
38
 
38
39
 
@@ -0,0 +1,140 @@
1
+ # rpa_suite/core/asyncrun.py
2
+
3
+ # imports third-party
4
+ from typing import Any, Callable, Dict, Optional, TypeVar, Generic
5
+ import asyncio
6
+ import time
7
+ import traceback
8
+ from functools import wraps
9
+
10
+
11
+ T = TypeVar('T')
12
+
13
+
14
+ class AsyncRunner(Generic[T]):
15
+ """
16
+ Class to execute asynchronous functions while maintaining the main application flow.
17
+
18
+ Allows executing asynchronous functions and retrieving their results later.
19
+ Optimized for I/O bound operations (network, files, etc).
20
+ """
21
+
22
+ def __init__(self):
23
+ """Start AsyncRunner."""
24
+ self._task = None
25
+ self._start_time = None
26
+ self._result = {}
27
+
28
+ @staticmethod
29
+ def _to_async(func: Callable) -> Callable:
30
+ """
31
+ Converts a synchronous function into an asynchronous one if necessary.
32
+
33
+ Args:
34
+ func: The function to be converted.
35
+
36
+ Returns:
37
+ A callable that is asynchronous.
38
+ """
39
+ @wraps(func)
40
+ async def wrapper(*args, **kwargs):
41
+ if asyncio.iscoroutinefunction(func):
42
+ return await func(*args, **kwargs)
43
+ return await asyncio.to_thread(func, *args, **kwargs)
44
+ return wrapper
45
+
46
+ async def _execute_function(self, function, args, kwargs):
47
+ """
48
+ Executes the function and manages results/errors.
49
+
50
+ Args:
51
+ function: The function to be executed.
52
+ args: Positional arguments for the function.
53
+ kwargs: Keyword arguments for the function.
54
+ """
55
+ try:
56
+ async_func = self._to_async(function)
57
+ result = await async_func(*args, **kwargs)
58
+
59
+ self._result = {
60
+ 'status': 'success',
61
+ 'result': result,
62
+ 'success': True
63
+ }
64
+
65
+ except Exception as e:
66
+ self._result = {
67
+ 'status': 'error',
68
+ 'error': str(e),
69
+ 'traceback': traceback.format_exc(),
70
+ 'success': False
71
+ }
72
+
73
+ def run(self, function: Callable[..., T], *args, **kwargs) -> 'AsyncRunner[T]':
74
+ """
75
+ Starts the execution of the function asynchronously.
76
+
77
+ Args:
78
+ function: The function to be executed.
79
+ *args: Positional arguments for the function.
80
+ **kwargs: Keyword arguments for the function.
81
+
82
+ Returns:
83
+ self: Returns the instance itself.
84
+ """
85
+ self._result.clear()
86
+ self._start_time = time.time()
87
+
88
+ # Creates and schedules the asynchronous task
89
+ loop = asyncio.get_event_loop()
90
+ self._task = loop.create_task(self._execute_function(function, args, kwargs))
91
+
92
+ return self
93
+
94
+ def is_running(self) -> bool:
95
+ """
96
+ Checks if the task is still running.
97
+
98
+ Returns:
99
+ True if the task is running, False otherwise.
100
+ """
101
+ return self._task is not None and not self._task.done()
102
+
103
+ async def get_result(self, timeout: Optional[float] = None) -> Dict[str, Any]:
104
+ """
105
+ Retrieves the result of the asynchronous execution.
106
+
107
+ Args:
108
+ timeout: Maximum time (in seconds) to wait.
109
+
110
+ Returns:
111
+ A dictionary with the result or error information.
112
+ """
113
+ if self._task is None:
114
+ return {
115
+ 'success': False,
116
+ 'error': 'No task has been started',
117
+ 'execution_time': 0
118
+ }
119
+
120
+ try:
121
+ await asyncio.wait_for(self._task, timeout=timeout)
122
+
123
+ except asyncio.TimeoutError:
124
+ self._task.cancel()
125
+ return {
126
+ 'success': False,
127
+ 'error': f'Operation canceled due to timeout after {time.time() - self._start_time:.2f} seconds',
128
+ 'execution_time': time.time() - self._start_time
129
+ }
130
+
131
+ result = dict(self._result)
132
+ result['execution_time'] = time.time() - self._start_time
133
+ return result
134
+
135
+ def cancel(self) -> None:
136
+ """
137
+ Cancels the running task.
138
+ """
139
+ if self.is_running():
140
+ self._task.cancel()
rpa_suite/core/browser.py CHANGED
@@ -16,7 +16,6 @@ from time import sleep
16
16
  import os, requests
17
17
 
18
18
 
19
-
20
19
  class Browser():
21
20
 
22
21
  """
rpa_suite/core/date.py CHANGED
@@ -10,6 +10,7 @@ from typing import Tuple
10
10
 
11
11
 
12
12
  class Date():
13
+
13
14
  """
14
15
  Class that provides utilities for date manipulation and formatting.
15
16
 
rpa_suite/core/file.py CHANGED
@@ -13,7 +13,6 @@ from datetime import datetime
13
13
  from typing import Dict, List, Union
14
14
 
15
15
 
16
-
17
16
  class File():
18
17
  """
19
18
  Class that provides utilities for file management, including creation, deletion, and manipulation of files.
@@ -1,31 +1,60 @@
1
1
  # rpa_suite/core/parallel.py
2
2
 
3
+ # imports third-party
3
4
  from multiprocessing import Process, Manager
4
5
  from typing import Any, Callable, Dict, Optional, TypeVar, Generic
5
6
  import time
6
7
  import traceback
7
8
 
8
- # Definir tipo genérico para o retorno da função
9
+ # Define a generic type for the function return
9
10
  T = TypeVar('T')
10
11
 
12
+
11
13
  class ParallelRunner(Generic[T]):
12
14
 
13
15
  """
16
+ Class to execute functions in parallel while maintaining the main application flow.
17
+
18
+ Allows starting a function in a separate process and retrieving its result later.
19
+
20
+ pt-br
21
+ ------
14
22
  Classe para executar funções em paralelo mantendo o fluxo principal da aplicação.
15
23
 
16
24
  Permite iniciar uma função em um processo separado e obter seu resultado posteriormente.
17
25
  """
18
26
 
19
- def __init__(self):
20
- """Inicializa o ParallelRunner."""
27
+ display_message = None
28
+
29
+ def __init__(self, display_message: bool = False):
30
+ """
31
+ Initializes the ParallelRunner.
32
+
33
+ Args:
34
+ display_message (bool): If True, displays debug messages during execution.
35
+
36
+ pt-br
37
+ ------
38
+ Inicializa o ParallelRunner.
39
+
40
+ Args:
41
+ display_message (bool): Se True, exibe mensagens de debug durante a execução.
42
+ """
43
+
21
44
  self._manager = Manager()
22
45
  self._result_dict = self._manager.dict()
23
46
  self._process = None
24
47
  self._start_time = None
25
-
48
+ self.display_message = display_message
49
+
26
50
  @staticmethod
27
51
  def _execute_function(function, args, kwargs, result_dict):
28
52
  """
53
+ Static method that executes the target function and stores the result.
54
+ This function needs to be defined at the module level to be "picklable".
55
+
56
+ pt-br
57
+ ------
29
58
  Função estática que executa a função alvo e armazena o resultado.
30
59
  Esta função precisa ser definida no nível do módulo para ser "picklable".
31
60
  """
@@ -38,8 +67,8 @@ class ParallelRunner(Generic[T]):
38
67
  result_dict['result'] = result
39
68
 
40
69
  # Para debug
41
- print(f"[Processo Filho] Resultado calculado: {result}")
42
- print(f"[Processo Filho] Dicionário de resultados: {dict(result_dict)}")
70
+ #print(f"[Processo Filho] Resultado calculado: {result}")
71
+ #print(f"[Processo Filho] Dicionário de resultados: {dict(result_dict)}")
43
72
 
44
73
  except Exception as e:
45
74
  # Em caso de erro, armazena informações sobre o erro
@@ -50,8 +79,53 @@ class ParallelRunner(Generic[T]):
50
79
  # Para debug
51
80
  print(f"[Processo Filho] Erro ocorrido: {str(e)}")
52
81
 
82
+ @staticmethod
83
+ def _execute_function_w_disp_msg(function, args, kwargs, result_dict):
84
+ """
85
+ Static method that executes the target function and stores the result.
86
+ This function needs to be defined at the module level to be "picklable".
87
+
88
+ pt-br
89
+ ------
90
+ Função estática que executa a função alvo e armazena o resultado.
91
+ Esta função precisa ser definida no nível do módulo para ser "picklable".
92
+ """
93
+ try:
94
+ # Executa a função do usuário com os argumentos fornecidos
95
+ result = function(*args, **kwargs)
96
+
97
+ # Armazena o resultado no dicionário compartilhado
98
+ result_dict['status'] = 'success'
99
+ result_dict['result'] = result
100
+
101
+ # Para debug
102
+ print(f"[Processo Filho] Resultado calculado: {result}")
103
+ print(f"[Processo Filho] Dicionário de resultados: {dict(result_dict)}")
104
+
105
+ except Exception as e:
106
+ # Em caso de erro, armazena informações sobre o erro
107
+ result_dict['status'] = 'error'
108
+ result_dict['error'] = str(e)
109
+ result_dict['traceback'] = traceback.format_exc()
110
+
111
+ # Para debug
112
+ print(f"[Processo Filho] Erro ocorrido: {str(e)}")
113
+
114
+
53
115
  def run(self, function: Callable[..., T], *args, **kwargs) -> 'ParallelRunner[T]':
54
116
  """
117
+ Starts the execution of the function in a parallel process.
118
+
119
+ Args:
120
+ function: Function to be executed in parallel
121
+ *args: Positional arguments for the function
122
+ **kwargs: Keyword arguments for the function
123
+
124
+ Returns:
125
+ self: Returns the instance itself to allow chained calls
126
+
127
+ pt-br
128
+ ------
55
129
  Inicia a execução da função em um processo paralelo.
56
130
 
57
131
  Args:
@@ -70,10 +144,17 @@ class ParallelRunner(Generic[T]):
70
144
  self._result_dict['status'] = 'running'
71
145
 
72
146
  # Inicia o processo com a função auxiliar estática
73
- self._process = Process(
74
- target=ParallelRunner._execute_function,
75
- args=(function, args, kwargs, self._result_dict)
76
- )
147
+ if self.display_message:
148
+ self._process = Process(
149
+ target=ParallelRunner._execute_function_w_disp_msg,
150
+ args=(function, args, kwargs, self._result_dict)
151
+ )
152
+ else:
153
+ self._process = Process(
154
+ target=ParallelRunner._execute_function,
155
+ args=(function, args, kwargs, self._result_dict)
156
+ )
157
+
77
158
  self._process.daemon = True # Processo filho termina quando o principal termina
78
159
  self._process.start()
79
160
  self._start_time = time.time()
@@ -82,33 +163,60 @@ class ParallelRunner(Generic[T]):
82
163
 
83
164
  def is_running(self) -> bool:
84
165
  """
85
- Verifica se o processo ainda está em execução.
166
+ Checks if the process is still running.
86
167
 
87
168
  Returns:
169
+ bool: True if the process is still running, False otherwise
170
+
171
+ pt-br
172
+ ------
173
+ Verifica se o processo ainda está em execução.
174
+
175
+ Retorna:
88
176
  bool: True se o processo ainda estiver em execução, False caso contrário
89
177
  """
90
178
  if self._process is None:
91
179
  return False
92
180
  return self._process.is_alive()
93
181
 
94
- def get_result(self, timeout: Optional[float] = None, terminate_on_timeout: bool = True) -> Dict[str, Any]:
182
+ def get_result(self, timeout: Optional[float] = 60, terminate_on_timeout: bool = True) -> Dict[str, Any]:
95
183
  """
96
- Obtém o resultado da execução paralela.
184
+ Retrieves the result of the parallel execution.
97
185
 
98
186
  Args:
99
- timeout: Tempo máximo (em segundos) para aguardar o término do processo
100
- None significa esperar indefinidamente
101
- terminate_on_timeout: Se True, termina o processo caso o timeout seja atingido
187
+ timeout: Maximum time (in seconds) to wait for the process to finish.
188
+ None means wait indefinitely.
189
+ terminate_on_timeout: If True, terminates the process if the timeout is reached.
102
190
 
103
191
  Returns:
104
- Dict contendo:
105
- - success: bool indicando se a operação foi bem-sucedida
106
- - result: resultado da função (se bem-sucedida)
107
- - error: mensagem de erro (se houver)
108
- - traceback: stack trace completo (se houver erro)
109
- - execution_time: tempo de execução em segundos
110
- - terminated: True se o processo foi terminado por timeout
192
+ - Dict containing:
193
+ - success: bool indicating if the operation was successful.
194
+ - result: result of the function (if successful).
195
+ - error: error message (if any).
196
+ - traceback: full stack trace (if an error occurred).
197
+ - execution_time: execution time in seconds.
198
+ - terminated: True if the process was terminated due to timeout.
199
+
200
+ pt-br
201
+ ------
202
+
203
+ Recupera o resultado da execução paralela.
204
+
205
+ Args:
206
+ timeout: Tempo máximo (em segundos) para aguardar o término do processo.
207
+ None significa aguardar indefinidamente.
208
+ terminate_on_timeout: Se True, termina o processo se o tempo limite for atingido.
209
+
210
+ Retorna:
211
+ - Dicionário contendo:
212
+ - success: bool indicando se a operação foi bem-sucedida.
213
+ - result: resultado da função (se bem-sucedida).
214
+ - error: mensagem de erro (se houver).
215
+ - traceback: rastreamento completo da pilha (se ocorreu um erro).
216
+ - execution_time: tempo de execução em segundos.
217
+ - terminated: True se o processo foi terminado devido ao tempo limite.
111
218
  """
219
+
112
220
  if self._process is None:
113
221
  return {
114
222
  'success': False,
@@ -128,7 +236,7 @@ class ParallelRunner(Generic[T]):
128
236
  }
129
237
 
130
238
  # Debug - mostra o dicionário compartilhado
131
- print(f"[Processo Principal] Dicionário compartilhado: {dict(self._result_dict)}")
239
+ if self.display_message: print(f"[Processo Principal] Dicionário compartilhado: {dict(self._result_dict)}")
132
240
 
133
241
  # Verifica se o processo terminou ou se atingiu o timeout
134
242
  if self._process.is_alive():
@@ -167,6 +275,10 @@ class ParallelRunner(Generic[T]):
167
275
 
168
276
  def terminate(self) -> None:
169
277
  """
278
+ Terminates the running process.
279
+
280
+ pt-br
281
+ ------
170
282
  Termina o processo em execução.
171
283
  """
172
284
  if self._process and self._process.is_alive():
@@ -176,6 +288,10 @@ class ParallelRunner(Generic[T]):
176
288
 
177
289
  def _cleanup(self) -> None:
178
290
  """
291
+ Cleans up resources used by the process.
292
+
293
+ pt-br
294
+ ------
179
295
  Limpa os recursos utilizados pelo processo.
180
296
  """
181
297
  if hasattr(self, '_manager') and self._manager is not None:
@@ -188,6 +304,10 @@ class ParallelRunner(Generic[T]):
188
304
 
189
305
  def __del__(self):
190
306
  """
307
+ Destructor of the class, ensures resources are released.
308
+
309
+ pt-br
310
+ ------
191
311
  Destrutor da classe, garante que recursos sejam liberados.
192
312
  """
193
- self.terminate()
313
+ self.terminate()
rpa_suite/suite.py CHANGED
@@ -11,6 +11,7 @@ from .core.print import Print
11
11
  from .core.regex import Regex
12
12
  from .core.validate import Validate
13
13
  from .core.parallel import ParallelRunner
14
+ from .core.asyncrun import AsyncRunner
14
15
 
15
16
 
16
17
  # imports external
@@ -148,6 +149,7 @@ class Suite():
148
149
  regex: Regex = Regex()
149
150
  validate: Validate = Validate()
150
151
  Parallel: ParallelRunner = ParallelRunner
152
+ Asyn: AsyncRunner = AsyncRunner
151
153
 
152
154
  # On this case, we are importing the Browser class only if the selenium and webdriver_manager modules are installed.
153
155
  # This is useful to avoid unnecessary imports and dependencies if the user does not need the Browser functionality.
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rpa_suite
3
- Version: 1.4.8
3
+ Version: 1.5.0
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
7
7
  License: MIT
8
- Keywords: basic-tools,email-tools,email-validation,file-tools,simple-functions,rpa-tools,rpa-functions,Tools,Rpa,Automation,RPA,Automação,Python,Ferramentas de RPA,Automação de Processos,Biblioteca Python para RPA,Bot,Robô,Ferramentas de automação
8
+ Keywords: basic-tools,email-tools,email-validation,file-tools,simple-functions,rpa-tools,rpa-functions,Tools,Rpa,Automation,RPA,Automação,Python,Ferramentas de RPA,Automação de Processos,Biblioteca Python para RPA,Bot,Robô,Ferramentas de automação,automation-tools,workflow-automation,rpa-framework,python-bots,automation-library,rpa-development,python-automation-tools
9
9
  Classifier: Development Status :: 3 - Alpha
10
10
  Classifier: Programming Language :: Python :: 3.11
11
11
  Classifier: Programming Language :: Python :: 3.12
@@ -46,9 +46,16 @@ Dynamic: summary
46
46
  <br>
47
47
 
48
48
  ![PyPI Latest Release](https://img.shields.io/pypi/v/rpa-suite.svg)
49
+ [![PyPI Downloads](https://static.pepy.tech/badge/rpa-suite/month)](https://pepy.tech/projects/rpa_suite)
49
50
  ![PyPI Downloads](https://img.shields.io/pypi/dm/rpa-suite.svg?label=PyPI%20downloads)
51
+ [![PyPI version](https://img.shields.io/pypi/v/rpa-suite)](https://pypi.org/project/rpa-suite/)
52
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/rpa-suite)](https://pypi.org/project/rpa-suite/)
53
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
54
+ [![Imports: pyautogui](https://img.shields.io/badge/%20imports-pyautogui-%231674b1?style=flat&labelColor=ef8336)](https://github.com/asweigart/pyautogui)
55
+ [![Imports: loguru](https://img.shields.io/badge/%20imports-loguru-%231674b1?style=flat&labelColor=ef8336)](https://github.com/Delgan/loguru)
56
+ [![License MIT](https://img.shields.io/github/license/docling-project/docling)](https://opensource.org/licenses/MIT)
57
+ [![rpa-suite Actor](https://apify.com/actor-badge?actor=camiloccarvalho/rpasuite?fpr=rpa-suite)](https://apify.com/camiloccarvalho/rpasuite)
50
58
 
51
- ---
52
59
 
53
60
  ## O que é?
54
61
 
@@ -65,9 +72,11 @@ Dynamic: summary
65
72
  - [Dependências](#dependências)
66
73
  - [Estrutura do módulo](#estrutura-do-módulo)
67
74
  - [Release](#release)
68
- - [Notas da atualização: 1.4.8](#notas-da-atualização-148)
69
75
  - [Mais Sobre](#mais-sobre)
70
76
 
77
+ - [Notas da atualização: 1.4.9](#notas-da-atualização-149)
78
+
79
+
71
80
  ## Destaque
72
81
 
73
82
  **Versátil**: Além da Automação de Processos e criação de BOT em RPA, mas também para uso geral podendo ser aplicadas em outros modelos de projeto, *além do RPA*.
@@ -114,36 +123,38 @@ rpa.email.send_mail(...)
114
123
 
115
124
  > [!NOTE]
116
125
  >
117
- > Para **desinstalar** o projeto, utilize o comando abaixo.
118
- > **Obs.:** como usamos algumas libs no projeto, lembre-se de desinstar elas caso necessário.
119
-
120
- ```python
121
- >>> python -m pip uninstall rpa-suite
122
- ```
123
-
124
- > [!IMPORTANT]
126
+ > Para **desinstalar** o projeto, utilize o comando abaixo:
127
+ >
128
+ > ```python
129
+ > python -m pip uninstall rpa-suite
130
+ > ```
125
131
  >
126
- > Opcionalmente você pode querer desinstalar as libs que foram inclusas no projeto, sendo assim:
132
+ > **Observação:** Caso necessário, desinstale também as bibliotecas utilizadas no projeto, como `loguru`, `mail_validator`, `colorama`, `pillow`, e `pyautogui`.
127
133
 
128
- ```python
129
- >>> python -m pip uninstall loguru mail_validator colorama pillow pyautogui
130
- ```
134
+ > **⚠️ IMPORTANTE:**
135
+ > Opcionalmente, você pode querer desinstalar as bibliotecas que foram incluídas no projeto. Para isso, utilize o seguinte comando:
136
+ >
137
+ > ```python
138
+ > python -m pip uninstall loguru mail_validator colorama pillow pyautogui
139
+ > ```
131
140
 
132
141
  ## Exemplo
133
142
 
134
143
  Do módulo principal, importe a suite. Ela retorna uma instância do Objeto de classe Rpa_suite, onde possui variáveis apontando para todas funções dos submódulos:
135
144
 
136
- from rpa_suite import rpa
145
+ ```python
146
+ from rpa_suite import rpa
137
147
 
138
- # Exemplo com função de execução em horario especifico
139
- rpa.clock.exec_at_hour('13:53', my_function, param_a, param_b)
148
+ # Exemplo com função de execução em horário específico
149
+ rpa.clock.exec_at_hour('13:53', my_function, param_a, param_b)
140
150
 
141
- # Usando submódulo clock para aguardar 30(seg) para executar minha função
142
- time = 30
143
- rpa.clock.wait_for_exec(time, my_function, param1, param2)
151
+ # Usando submódulo clock para aguardar 30(seg) para executar minha função
152
+ time = 30
153
+ rpa.clock.wait_for_exec(time, my_function, param1, param2)
144
154
 
145
- # Usando submódulo email para envio de email por smtp comum
146
- rpa.email.send_smtp(...)
155
+ # Usando submódulo email para envio de email por SMTP comum
156
+ rpa.email.send_smtp(...)
157
+ ```
147
158
 
148
159
  ## Dependências
149
160
 
@@ -156,14 +167,19 @@ No setup do nosso projeto já estão inclusas as dependências, só será necess
156
167
  - pillow
157
168
  - pyautogui
158
169
  - typing
170
+ - setuptools
159
171
 
160
172
  opcionalmente para automação de navegador:
161
173
 
162
174
  - selenium
163
175
  - webdriver_manager
164
176
 
165
- [!IMPORTANT]
166
- No caso da função de screenshot é necessario ter as libs 'pyautogui' 'pillow' e 'pyscreeze' instalados, geralmente a instalação de pyautogui já instala as demais dependências deste caso.
177
+ <br>
178
+ <hr>
179
+ <br>
180
+
181
+ > **⚠️ IMPORTANTE:**
182
+ > No caso da função de screenshot, é necessário ter as bibliotecas `pyautogui`, `pillow` e `pyscreeze` instaladas. Geralmente, a instalação de `pyautogui` já inclui as demais dependências necessárias.
167
183
 
168
184
  ## Estrutura do módulo
169
185
 
@@ -226,36 +242,46 @@ O módulo principal do rpa-suite é dividido em categorias. Cada categoria cont
226
242
  - **get_result** - Função para coletar o retorno da execução em paralelo junto com resultado da função ou funções que foram enviadas a este processo com retorno em forma de dict.
227
243
  - **terminate** - Função para finalizar o processo paralelo mantendo apenas o processo principal do seu código, também é chamada de forma automatica esta função ao final de um procesos paralelo ou no final da função "get_result".
228
244
 
229
- ## Release
245
+ - **async**
246
+ - **run** - Função para iniciar a execução assíncrona de uma função mantendo o fluxo principal da aplicação.
247
+ - **is_running** - Função para verificar se a tarefa assíncrona ainda está em execução.
248
+ - **get_result** - Função para obter o resultado da execução assíncrona, incluindo tempo de execução e status, com suporte a timeout.
249
+ - **cancel** - Função para cancelar a tarefa assíncrona em execução.
250
+
251
+ ## Release Notes
230
252
 
231
- Versão: **Beta 1.4.8**
253
+ ### Versão: **Beta 1.5.0**
232
254
 
233
- Lançamento: *20/02/2024*
255
+ - **Data de Lançamento:** *20/02/2024*
256
+ - **Última Atualização:** *15/04/2025*
257
+ - **Status:** Em desenvolvimento
234
258
 
235
- Última atualização: *12/04/2025*
259
+ Esta versão marca um grande avanço no desenvolvimento da RPA Suite, trazendo melhorias significativas na arquitetura, novas funcionalidades e maior simplicidade no uso. Confira as principais mudanças na seção [Notas da atualização: 1.5.0](#notas-da-atualização-150).
236
260
 
237
- Status: Em desenvolvimento.
261
+ ### Notas da atualização: 1.5.0
238
262
 
239
- ### Notas da atualização: 1.4.8
263
+ - Submódulos agora são objetos internos do objeto principal `Suite`, acessíveis via `rpa.modulo.function()` ou diretamente pelo submódulo.
264
+ - Estrutura reformulada para maior simplicidade, com pastas `core` (núcleo) e `utils` (ferramentas utilitárias).
265
+ - Novo submódulo `Parallel` para execução de processos em paralelo com suporte a timeout e recuperação de resultados.
266
+ - Novo submódulo `AsyncRunner` para facilitar o uso de funções assíncronas com menos código.
267
+ - Adicionado suporte à automação de navegadores (inicialmente apenas Chrome).
268
+ - Função `get_dma` renomeada para `get_dmy` para padronização em inglês.
269
+ - Função `send_email` simplificada para maior compatibilidade.
270
+ - Melhorias nas descrições e adição de docstrings em todas as funções e objetos.
271
+ - Submódulo de logs unificado com Loguru, agora com suporte a configuração de diretórios, nomes de arquivos e streams para console e arquivo.
272
+ - Regex e busca em textos simplificados, com novas funcionalidades planejadas.
273
+ - Melhorias gerais na arquitetura e correções de bugs.
240
274
 
241
- - Mudança dos submodulos para Objetos, agora Rpa_suite é um Objeto de Suite que compoe diversos sub-objetos separados pelas mesmas categorias anteriormente ja definidas
242
- - Reformulada a arquitetura do projeto para melhor coeção e menos subpastas e arquivos, agora a estrutura é mais simples e de melhor manutenção contendo apenas uma pasta core para o nucleo de nossos modulos, e uma pasta utils com ferramentas utilitarias que vamos adicionar varias novidades
243
- - Adicionado SubModulo Parallel com função dedicada a rodar um processo em paralelo com seu fluxo principal podendo recuperar o resultado da execução em paralelo a qualquer momento e setando timeout ou deixando o tempo indefinido para aguardar a resposta.
244
- - Adicionado setor utils com funcionalidade de tornar o diretorio atual em um importavel relativo para o python
245
- - Adicionado Automação de Navegadores! Sim estamos devendo esta feature a bastante tempo, porem estamos com a primeira versão disponivel, em breve teremos mais recursos e disponibilidade para outros navegadores, atualmente suporte apenas para *Chrome.*
246
- - Mantemos o alerta! **get_dma** atualizada e **renomeada** para **get_dmy** para manter o padrão em ingles
247
- - Função *send_email* atualizada para simplificar seu uso e funcionalidade em uma maior variedade de maquinas
248
- - Melhoria nas descrições das funções e adicionado docstring (documentação explicativa) de todos Objetos e respectivas funções
249
- - Sub-modulos agora como são Objetos internos do Objeto principal Suite pode ser acessado de duas formas, ex1: " from rpa_suite import rpa ; rpa.modulo.function() " ou então ex2: "from rpa_suite.core.Submodulo import NomeModulo ; meu_obj = NomeModulo() ; meu_obj.function()",
250
- - Funções de regex e busca em textos foi simplificada e em breve estaremos adicionando funcionalidades mais interessantes.
251
- - Correção e melhoria do Submodulo de Log. Tinhamos dois formatos de Log com duas bibliotecas e decidimos optar apenas pela Loguru para podermos dedicar mais atenção e fornecer recursos de Log mais completos, agora possui funcionalidade para indicar o caminho da pasta, nome da pasta, e também nome do arquivo, realizando stream tanto para o console (terminal) como também para o arquivo com todos levels já configurados e personalizados para ter distinção e facilitar o reconhecimento visual do que esta acontecendo no seu projeto.
252
275
 
253
276
  ## Mais Sobre
254
277
 
255
- Para mais informações, visite nosso projeto no Github ou PyPi:
278
+ Para mais informações, visite os links abaixo:
256
279
 
257
- [Ver no GitHub](https://github.com/CamiloCCarvalho/rpa_suite)
280
+ - **[Repositório no GitHub](https://github.com/CamiloCCarvalho/rpa_suite)**
281
+ Explore o código-fonte, contribua com melhorias e acompanhe o desenvolvimento do projeto.
258
282
 
259
- [Ver projeto publicado no PyPI](https://pypi.org/project/rpa-suite/)
283
+ - **[Página no PyPI](https://pypi.org/project/rpa-suite/)**
284
+ Confira a documentação oficial, instale a biblioteca e veja as versões disponíveis.
285
+
286
+ ---
260
287
 
261
- <hr>
@@ -1,14 +1,15 @@
1
1
  rpa_suite/__init__.py,sha256=KO6GC2XbZUO56SAOgKxIkycHFEy6oeWPSswd8-B5IP4,2562
2
- rpa_suite/suite.py,sha256=4aKwFsIz4YuDuKD41o2ws5bRkmt11uDblymCarYHHUw,11110
3
- rpa_suite/core/__init__.py,sha256=27hq1brv83Kf89xtk-VVQx2etUWWBnVoZMgbgKI7Ac0,1678
4
- rpa_suite/core/browser.py,sha256=XgUoOc6pcFwnSQxSlcOF0x8JjlUmj7gw3OvSJ_EoQns,14757
2
+ rpa_suite/suite.py,sha256=1lsdFLz44gh7y3leOR5BCsx1dEKam5cm1g7l5RCFsYc,11187
3
+ rpa_suite/core/__init__.py,sha256=oGQiEtmgR9fBHgcAKYsl5eZsS2_SbRZnlhzOgRqXrAM,1713
4
+ rpa_suite/core/asyncrun.py,sha256=S5b-ueG4oJmupBZLsfYqcyTA5k5SaAi8j3KU8NnTOMg,4378
5
+ rpa_suite/core/browser.py,sha256=h1sMERkEw8y8zfQs2hdv2VbBNt3pQlVkMlkQOTKpaKQ,14755
5
6
  rpa_suite/core/clock.py,sha256=-ZEEaTYzwoYk9Bw1K6K1RN4s7O21uEhTg2hgBmdYLtQ,13880
6
- rpa_suite/core/date.py,sha256=4T8_JKWBcYh4klQBAYx4RrmsKqz7uUb8wD5UtgCueeg,6629
7
+ rpa_suite/core/date.py,sha256=0dqkP7zVjWeMmZA5xDZuvin97yYPMl1p0bCfLmtXdlM,6635
7
8
  rpa_suite/core/dir.py,sha256=sc_mJGrjo520cmNyC_HZo3YKEbORkBDfD3bCLaQ7U2o,9855
8
9
  rpa_suite/core/email.py,sha256=CUqhW8-BF0XS7vFeZieQ13VywEg1TQZVoicEexSQCPE,8671
9
- rpa_suite/core/file.py,sha256=9Psho6n9eqfLu3aA3XW43LzXefEJnAgIentFyopOpxQ,11623
10
+ rpa_suite/core/file.py,sha256=8eKlOSRptCYDJ-zRrHYK7tnmxR-JjQ55U47BRRdMGRE,11621
10
11
  rpa_suite/core/log.py,sha256=7VTPKXzVkWMg1W5bBO6BM3XDihKqNOcB4D-d6ytDbts,5631
11
- rpa_suite/core/parallel.py,sha256=Pftz5cC-3jJLlprLjjSYadc6A9omBBmziCmeUcvNKh4,7668
12
+ rpa_suite/core/parallel.py,sha256=p5jM7UwLWGYoYuQoUo659469nsuvy9QEkzVhXqu-GnU,11876
12
13
  rpa_suite/core/print.py,sha256=jhCNdid67dtVE6cCgRnWjqUrmsJcAr1hN38MHVupgfo,6423
13
14
  rpa_suite/core/regex.py,sha256=gh3dlV29chepdoaWsl5yW9Db6MHQTGJeWstm0mD9zKU,3377
14
15
  rpa_suite/core/validate.py,sha256=vKpl4u7f8CM30e_1rS6sqUqePy0ga51HHGn1cgent1o,11032
@@ -17,8 +18,8 @@ rpa_suite/functions/__init__.py,sha256=aa0jejVvnghufR50owKcKpmYit7XVAliyN9gn9Jkd
17
18
  rpa_suite/functions/_printer.py,sha256=51Xbqr0Ck7HHOrhJCxhMxdCKrF_kQ5AsKZN5SZQPwpk,3991
18
19
  rpa_suite/utils/__init__.py,sha256=RQ-m9QNbaByek25moxx9ajpuxjPAEdjoMu69ReLBCWY,675
19
20
  rpa_suite/utils/system.py,sha256=fQ9BAWxVETrFUeZJlfhN3cLzToU3XDQYqvDS9W0hWgY,1157
20
- rpa_suite-1.4.8.dist-info/licenses/LICENSE,sha256=5D8PIbs31iGd9i1_MDNg4SzaQnp9sEIULALh2y3WyMI,1102
21
- rpa_suite-1.4.8.dist-info/METADATA,sha256=N6Yo_DNSgM__jAR4X1SUULETkDQZRSnG-bcciOxkOXQ,12769
22
- rpa_suite-1.4.8.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
23
- rpa_suite-1.4.8.dist-info/top_level.txt,sha256=HYkDtg-kJNAr3F2XAIPyJ-QBbNhk7q6jrqsFt10lz4Y,10
24
- rpa_suite-1.4.8.dist-info/RECORD,,
21
+ rpa_suite-1.5.0.dist-info/licenses/LICENSE,sha256=5D8PIbs31iGd9i1_MDNg4SzaQnp9sEIULALh2y3WyMI,1102
22
+ rpa_suite-1.5.0.dist-info/METADATA,sha256=jbmz5bzFrjkmQfoB1LnP8Tzr1eFVjj9So0p62iK8gLg,13693
23
+ rpa_suite-1.5.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
24
+ rpa_suite-1.5.0.dist-info/top_level.txt,sha256=HYkDtg-kJNAr3F2XAIPyJ-QBbNhk7q6jrqsFt10lz4Y,10
25
+ rpa_suite-1.5.0.dist-info/RECORD,,