rpa-suite 1.5.8__py3-none-any.whl → 1.6.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.
rpa_suite/suite.py CHANGED
@@ -13,7 +13,6 @@ from .core.validate import Validate
13
13
  from .core.parallel import ParallelRunner
14
14
  from .core.asyncrun import AsyncRunner
15
15
 
16
-
17
16
  # imports external
18
17
  from colorama import Fore
19
18
  from importlib.metadata import version
@@ -104,6 +103,10 @@ class Suite:
104
103
  ``printer``: Functions for formatted output
105
104
  ``regex``: Operations with regular expressions
106
105
  ``validate``: Data validation functions
106
+ ``ParallelRunner``: Object ParallelRunner functions to run in parallel
107
+ ``AsyncRunner``: Object AsyncRunner functions to run in Assyncronous
108
+ ``Browser``: Object Browser automation functions (neeeds Selenium and Webdriver_Manager)
109
+ ``Iris``: Object Iris automation functions to convert documents with OCR + IA based on ``docling``
107
110
 
108
111
  pt-br
109
112
  -----
@@ -133,6 +136,10 @@ class Suite:
133
136
  ``printer``: Funções para output formatado
134
137
  ``regex``: Operações com expressões regulares
135
138
  ``validate``: Funções de validação de dados
139
+ ``ParallelRunner``: Objeto ParallelRunner funções para rodar processos em paralelo
140
+ ``AsyncRunner``: Objeto AsyncRunner funções para rodar processos em assincronicidade
141
+ ``Browser``: Objeto de Automação de Navegadores (necessario Selenium e Webdriver_Manager)
142
+ ``Iris``: Objeto Iris Automação de funções para converter documentos com OCR + IA baseado em ``docling``
136
143
  """
137
144
 
138
145
  # SUBMODULES
@@ -148,24 +155,28 @@ class Suite:
148
155
  Parallel: ParallelRunner = ParallelRunner
149
156
  Asyn: AsyncRunner = AsyncRunner
150
157
 
151
- # On this case, we are importing the Browser class only if the selenium and webdriver_manager modules are installed.
152
- # This is useful to avoid unnecessary imports and dependencies if the user does not need the Browser functionality.
158
+ # On this case, we are importing the (Browser | Iris) class only if the selenium and webdriver_manager modules are installed.
159
+ # This is useful to avoid unnecessary imports and dependencies if the user does not need the (Browser | Iris) functionality.
153
160
  import importlib.util
154
161
 
155
162
  # from .browser import Browser
156
- if importlib.util.find_spec("selenium") and importlib.util.find_spec(
157
- "webdriver_manager"
158
- ):
163
+ if importlib.util.find_spec("selenium") and importlib.util.find_spec("webdriver_manager"):
159
164
  from .core.browser import Browser
160
165
 
161
166
  browser: Browser = Browser
162
167
 
168
+ # from .iris import Iris
169
+ if importlib.util.find_spec("docling"):
170
+ from .core.iris import Iris
171
+
172
+ iris: Iris = Iris
173
+
163
174
  # VARIABLES INTERNAL
164
175
  try:
165
176
  # old: __version__ = pkg_resources.get_distribution("rpa_suite").version
166
-
177
+
167
178
  __version__ = version("package_name")
168
-
179
+
169
180
  except Exception:
170
181
  __version__ = "unknown"
171
182
 
@@ -242,9 +253,7 @@ class Suite:
242
253
  """
243
254
  print(f"{color}{string_text}{Colors.default}", end=ending)
244
255
 
245
- def magenta_print(
246
- self, string_text: str, color=Colors.magenta, ending="\n"
247
- ) -> None:
256
+ def magenta_print(self, string_text: str, color=Colors.magenta, ending="\n") -> None:
248
257
  """
249
258
  Print customized with the color Magenta \n
250
259
 
@@ -278,9 +287,7 @@ class Suite:
278
287
  """
279
288
  print(f"{color}{string_text}{Colors.default}", end=ending)
280
289
 
281
- def print_call_fn(
282
- self, string_text: str, color=Colors.call_fn, ending="\n"
283
- ) -> None:
290
+ def print_call_fn(self, string_text: str, color=Colors.call_fn, ending="\n") -> None:
284
291
  """
285
292
  Print customized for function called (log) \n
286
293
  Color: Magenta Light
@@ -298,9 +305,7 @@ class Suite:
298
305
  """
299
306
  print(f"{color}{string_text}{Colors.default}", end=ending)
300
307
 
301
- def print_retur_fn(
302
- self, string_text: str, color=Colors.retur_fn, ending="\n"
303
- ) -> None:
308
+ def print_retur_fn(self, string_text: str, color=Colors.retur_fn, ending="\n") -> None:
304
309
  """
305
310
  Print customized for function return (log) \n
306
311
  Color: Yellow Light
@@ -320,10 +325,16 @@ class Suite:
320
325
 
321
326
  def __install_all_libs(self):
322
327
  """
328
+ Method responsible for installing all libraries for advanced use of RPA-Suite, including all features such as OCR and AI agent.
329
+ ----------
323
330
  Metodo responsavel por instalar todas libs para uso avançado do RPA-Suite com todas funcionalidades incluindo OCR e agente de IA
324
331
  """
325
332
 
326
333
  libs = [
334
+ "setuptools",
335
+ "wheel",
336
+ "pyperclip",
337
+ "pywin32"
327
338
  "colorama",
328
339
  "colorlog",
329
340
  "email_validator",
@@ -334,15 +345,16 @@ class Suite:
334
345
  "selenium",
335
346
  "typing",
336
347
  "webdriver_manager",
348
+ "docling",
337
349
  ]
338
350
 
339
351
  for lib in libs:
340
352
  try:
341
353
  subprocess.check_call([sys.executable, "-m", "pip", "install", lib])
342
- self.success_print(f"Biblioteca {lib} instalada com sucesso!")
354
+ self.success_print(f"Suite RPA: Library {lib} installed successfully!")
343
355
 
344
356
  except subprocess.CalledProcessError:
345
- self.error_print(f"Erro ao instalar biblioteca {lib}")
357
+ self.error_print(f"Suite RPA: Error installing library {lib}")
346
358
 
347
359
 
348
360
  rpa = Suite()
@@ -12,4 +12,4 @@ O módulo de utilitários da rpa-suite fornece uma coleção de funções e clas
12
12
  from .system import Tools
13
13
 
14
14
 
15
- __version__ = '1.5.5'
15
+ __version__ = "1.5.5"
rpa_suite/utils/system.py CHANGED
@@ -1,11 +1,13 @@
1
1
  # rpa_suite/utils/system.py
2
2
 
3
+ # imports third-party
4
+ import sys
5
+ import os
6
+ import ctypes
7
+
3
8
  # imports internal
4
9
  from rpa_suite.functions._printer import error_print, success_print
5
10
 
6
- # imports third-party
7
- import sys, os, ctypes
8
-
9
11
 
10
12
  class Utils:
11
13
  """
@@ -13,8 +15,8 @@ class Utils:
13
15
 
14
16
  Fornece métodos para manipulação de caminhos de importação e configurações do sistema.
15
17
  """
16
-
17
- def __init__(self):
18
+
19
+ def __init__(self):
18
20
  """
19
21
  Inicializa a classe Utils.
20
22
 
@@ -25,18 +27,17 @@ class Utils:
25
27
  except Exception as e:
26
28
  error_print(f"Erro durante a inicialização da classe Utils: {str(e)}.")
27
29
 
28
-
29
30
  def set_importable_dir(self, display_message: bool = False) -> None:
30
31
  """
31
32
  Configura o diretório atual como importável, adicionando-o ao caminho do sistema.
32
33
 
33
- Adiciona o diretório pai do módulo atual ao sys.path, permitindo importações
34
+ Adiciona o diretório pai do módulo atual ao sys.path, permitindo importações
34
35
  dinâmicas de módulos locais.
35
36
 
36
37
  Parâmetros:
37
38
  ----------
38
39
  display_message : bool, opcional
39
- Se True, exibe uma mensagem de sucesso após definir o diretório.
40
+ Se True, exibe uma mensagem de sucesso após definir o diretório.
40
41
  Por padrão é False.
41
42
 
42
43
  Retorna:
@@ -55,16 +56,14 @@ class Utils:
55
56
  success_print("Diretório configurado com sucesso para importação!")
56
57
 
57
58
  except Exception as e:
58
- error_print(
59
- f"Erro ao configurar diretório importável: {str(e)}."
60
- )
59
+ error_print(f"Erro ao configurar diretório importável: {str(e)}.")
61
60
 
62
61
 
63
62
  class KeepSessionActive:
64
63
  """
65
64
  Gerenciador de contexto avançado para prevenir bloqueio de tela no Windows.
66
65
 
67
- Utiliza chamadas de API do Windows para manter o sistema ativo durante
66
+ Utiliza chamadas de API do Windows para manter o sistema ativo durante
68
67
  execução de tarefas críticas, impedindo suspensão ou bloqueio de tela.
69
68
 
70
69
  Atributos de Classe:
@@ -87,7 +86,7 @@ class KeepSessionActive:
87
86
  """
88
87
  Inicializa as configurações de estado de execução do sistema.
89
88
 
90
- Configura constantes específicas do Windows para controle de energia
89
+ Configura constantes específicas do Windows para controle de energia
91
90
  e gerenciamento de estado do sistema operacional.
92
91
  """
93
92
  try:
@@ -96,13 +95,12 @@ class KeepSessionActive:
96
95
  self.ES_DISPLAY_REQUIRED = 0x00000002
97
96
  except Exception as e:
98
97
  error_print(f"Erro ao inicializar KeepSessionActive: {str(e)}.")
99
-
100
98
 
101
99
  def __enter__(self) -> None:
102
100
  """
103
101
  Configura o estado de execução para prevenir bloqueio de tela.
104
102
 
105
- Utiliza chamada de API do Windows para manter sistema e display ativos
103
+ Utiliza chamada de API do Windows para manter sistema e display ativos
106
104
  durante a execução do bloco de código.
107
105
 
108
106
  Retorna:
@@ -122,13 +120,12 @@ class KeepSessionActive:
122
120
  except Exception as e:
123
121
  error_print(f"Erro ao configurar estado de execução: {str(e)}.")
124
122
  return self
125
-
126
123
 
127
124
  def __exit__(self, exc_type, exc_val, exc_tb) -> None:
128
125
  """
129
126
  Restaura as configurações padrão de energia do sistema.
130
127
 
131
- Método chamado automaticamente ao sair do bloco de contexto,
128
+ Método chamado automaticamente ao sair do bloco de contexto,
132
129
  revertendo as configurações de estado de execução para o padrão.
133
130
 
134
131
  Parâmetros:
@@ -149,10 +146,12 @@ class KeepSessionActive:
149
146
  except Exception as e:
150
147
  error_print(f"Erro ao restaurar estado de execução: {str(e)}.")
151
148
 
149
+
152
150
  class Tools(Utils):
153
151
  """
154
152
  Classe utilitária para gerenciamento de configurações de sistema e diretórios.
155
153
 
156
154
  Fornece métodos para manipulação de caminhos de importação e configurações do sistema.
157
155
  """
156
+
158
157
  keep_session_active: KeepSessionActive = KeepSessionActive
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rpa_suite
3
- Version: 1.5.8
3
+ Version: 1.6.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@vettracode.com
@@ -282,25 +282,41 @@ O módulo principal do rpa-suite é dividido em categorias. Cada categoria cont
282
282
  - **get_result** - Função para obter o resultado da execução assíncrona, incluindo tempo de execução e status, com suporte a timeout.
283
283
  - **cancel** - Função para cancelar a tarefa assíncrona em execução.
284
284
 
285
+ **Iris (OCR-IA)**
286
+
287
+ - **read_document** - Reads and converts a document to the specified format.
288
+ - **read_multiple_documents** - Reads and converts multiple documents.
289
+ - **get_supported_extensions** - Returns the list of supported file extensions
290
+ - **is_file_supported** - Checks if a file is supported by the class.
291
+
292
+
285
293
  ## Release Notes
286
294
 
287
- ### Versão: **Beta 1.5.8**
295
+ ### Versão: **Beta 1.6.0**
288
296
 
289
297
  - **Data de Lançamento:** *20/02/2024*
290
- - **Última Atualização:** 02/06/2025
298
+ - **Última Atualização:** 08/06/2025
291
299
  - **Status:** Em desenvolvimento
292
300
 
293
301
  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 abaixo.
294
302
 
295
- ### Notas da atualização:
296
-
297
- - Submódulos agora são objetos internos do objeto principal `Suite`, acessíveis via `rpa.modulo.function()` ou diretamente pelo submódulo.
298
- - Estrutura reformulada para maior simplicidade, com pastas `core` (núcleo) e `utils` (ferramentas utilitárias).
299
- - Novo submódulo `ParallelRunner` (`Parallel`) para execução de processos em paralelo com suporte a timeout e recuperação de resultados.
300
- - Novo submódulo `AsyncRunner` (`Asyn`) para facilitar o uso de funções assíncronas com menos código.
301
- - Adicionado suporte à automação de navegadores (inicialmente apenas Chrome).
302
- - Melhorias nas descrições e adição de docstrings em todas as funções e objetos.
303
- - 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.
303
+ ### Notas:
304
+ - atualização 1.6.0
305
+ - Adição Módulo: Iris (OCR-IA)
306
+ - Feat.: leitura de documento (aceita multiplos formatos)
307
+ - Feat.: leitura em lote (multiplos docmumentos em uma unica chamada)
308
+ - Melhoria de docstrings
309
+
310
+ - atualização 1.5.9
311
+ - Atualização de Linters e Formatters
312
+ - black
313
+ - pylint
314
+ - bandit
315
+ - flake8
316
+ - isort
317
+ - pyupgrade
318
+ - detect-secrets
319
+ - autoflake
304
320
 
305
321
 
306
322
  ## Mais Sobre
@@ -0,0 +1,26 @@
1
+ rpa_suite/__init__.py,sha256=WqIndloIi1jP_YsEf0lGNOxgr7Htdgt6XuL5ti5znb8,2915
2
+ rpa_suite/suite.py,sha256=j07ZkaJttJ9WhfIKcc7j6h11ZssRzWdpcvXQDBYZT_s,11804
3
+ rpa_suite/core/__init__.py,sha256=2KWotqRNuCNwVhACACB4zhrXnTWR9H77_6U6j0WTJK0,1738
4
+ rpa_suite/core/asyncrun.py,sha256=gRKsqvT4QAwg906BkLQXHi-oMbjM30D3yRWV1qAqj1Y,4192
5
+ rpa_suite/core/browser.py,sha256=NeJk8lWDKZcGR9ULfWkDZ4WmFujU-DVr5-QH0qUSSgU,14725
6
+ rpa_suite/core/clock.py,sha256=ELhgehLoqrf5bjkDpJ8wkcha9YmsnIfLb0qQW7OKrzw,13161
7
+ rpa_suite/core/date.py,sha256=nnAktYMZNjcN4e6HEiYJgdMLD5VZluaOjfyfSPaz71c,6307
8
+ rpa_suite/core/dir.py,sha256=ZfgFeCkl8iB8Tc5dST35olImpj4PoWThovNYvtpwnu8,10329
9
+ rpa_suite/core/email.py,sha256=D69vPmoBJYwSTgDu5tvXhakvsYprXr0BAFRYeaVicx0,8473
10
+ rpa_suite/core/file.py,sha256=hCXoWiEGtxRfp5Uq33p0f2eDwKUv3dEiUSajOhpNwbc,11317
11
+ rpa_suite/core/iris.py,sha256=Z8aP96y78-DnzUxwtxJZiIXXOLXWTCsaWpdMoxROfQY,11467
12
+ rpa_suite/core/log.py,sha256=9dPDnV8e4p9lwZoyd1ICb6CjJiiSXTXVJseQkdtdRuQ,6542
13
+ rpa_suite/core/parallel.py,sha256=a_aEqvoJ9jxsFg1H42wsPT2pCS3WApqbGc2PETgBBEs,11460
14
+ rpa_suite/core/print.py,sha256=i1icdpNreQf2DCO6uLQKuuUD0vsrsOnYSpiQGaGNJi4,5780
15
+ rpa_suite/core/regex.py,sha256=IHQF-xHVacDuloQqcBJdTCjd7oXVqDdbGa50Mb803Bk,3321
16
+ rpa_suite/core/validate.py,sha256=Msk_bL9pBuenuUzFv7Wg9L_z3zXq0lOHsDavkwfaAn0,10620
17
+ rpa_suite/functions/__create_ss_dir.py,sha256=kaRotLlYDCQGKtv9nd8zZUorQmHYGbHmOEWJ1DZBBYc,3426
18
+ rpa_suite/functions/__init__.py,sha256=Y9Kp8tTmyCcQ4sErjb0c2cbDNTAAoTArEF2pYl7mt5s,57
19
+ rpa_suite/functions/_printer.py,sha256=gj7dwOt4roSj2iwOGWeGgUD3JVr7h4UESyCg9CmrieA,3946
20
+ rpa_suite/utils/__init__.py,sha256=bqxq5kckulcQzNCn1tHwHj0WMIQBTUYNDzMzBhLtbIY,729
21
+ rpa_suite/utils/system.py,sha256=kkTsjwBQ-8_G_6l-0tuwkpmeI3KVssRZ7QAiYlR3vt0,5185
22
+ rpa_suite-1.6.0.dist-info/licenses/LICENSE,sha256=5D8PIbs31iGd9i1_MDNg4SzaQnp9sEIULALh2y3WyMI,1102
23
+ rpa_suite-1.6.0.dist-info/METADATA,sha256=sIX1G91PeiHFKxPIrckrZFQ32BgGfv5Mf4YwKFsM4sQ,13546
24
+ rpa_suite-1.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
+ rpa_suite-1.6.0.dist-info/top_level.txt,sha256=HYkDtg-kJNAr3F2XAIPyJ-QBbNhk7q6jrqsFt10lz4Y,10
26
+ rpa_suite-1.6.0.dist-info/RECORD,,
@@ -1,25 +0,0 @@
1
- rpa_suite/__init__.py,sha256=PGlr0Y0NLLH1sarD1VTv-Tvm_uZPmo1Ar4LLncvUVFU,2365
2
- rpa_suite/suite.py,sha256=fIbli4MCBVKXvv5JFmzudcEZATYMFyvx9rIK9CceorI,10648
3
- rpa_suite/core/__init__.py,sha256=clmYBLmsmFRXGMABUjIkV-dBe_OlviowszdIJEwS-yM,1748
4
- rpa_suite/core/asyncrun.py,sha256=bE04H36V01LavLRzGMhaUDBrnwhwLLSqpzKRZjsHVnA,4195
5
- rpa_suite/core/browser.py,sha256=tew_SaTBVsWZHi66O41GOLMrdoR1XvgQmtoBMjGa9iE,15009
6
- rpa_suite/core/clock.py,sha256=T8ilbWrmGwhRGBAVRCCvICWQ1_uu2VjDTJgNEljPYhY,13414
7
- rpa_suite/core/date.py,sha256=42Nwvyx-FBBImEyVhBGksmIZ9VSwyFqhQPVeEwSpmtc,6310
8
- rpa_suite/core/dir.py,sha256=sN9R-XGIrySAyUYIB3XVHzaZR5ZqcX2Ag-pKZ6G3jpY,10301
9
- rpa_suite/core/email.py,sha256=kH6wFPxekXxhqt4ry_gWOzVeV_YBSIzb_xr5CL9FR_8,8741
10
- rpa_suite/core/file.py,sha256=plj_sC-j2j2IEQ5NRTssnSNPaPGLBg-RjPwGZPpWsIo,11441
11
- rpa_suite/core/log.py,sha256=ieaAKO3R4H8YW8jcg9KMRjfKd1iRcjGzh2husVnQjgc,6678
12
- rpa_suite/core/parallel.py,sha256=nmATr6KimkAplDeh-dGwP6iB9muJ7ygDQ3NoYkEYgIg,11709
13
- rpa_suite/core/print.py,sha256=T-O4zaYzfPLKn5tEzgNrWOqRV_p4hAzT-c1Y3JDla24,5825
14
- rpa_suite/core/regex.py,sha256=76NjtLaIFM4LuTWLAOusQoOcP_Rub_G2ol9H6CIkTMg,3324
15
- rpa_suite/core/validate.py,sha256=gOISOwjCza-18kfpaZnWCrKj4aIk2s7U4mStBDUAC7E,10857
16
- rpa_suite/functions/__create_ss_dir.py,sha256=oAvZCMRgrBNUpaYGEiNlUFa1XiVYDfOqPb9M8ITxqG8,3482
17
- rpa_suite/functions/__init__.py,sha256=nXet0AfuyaazPrJUzfCgE382hONS3QqxDLydo75J6NU,57
18
- rpa_suite/functions/_printer.py,sha256=gj7dwOt4roSj2iwOGWeGgUD3JVr7h4UESyCg9CmrieA,3946
19
- rpa_suite/utils/__init__.py,sha256=FeMyn0dSuj8gMBrvzk-61mkz4F_hPT6l--vDyMWjxYw,729
20
- rpa_suite/utils/system.py,sha256=5ggEJoIZttoFZ46SKoQJoMp65exsYDQrzeDqzxqtMP0,5224
21
- rpa_suite-1.5.8.dist-info/licenses/LICENSE,sha256=5D8PIbs31iGd9i1_MDNg4SzaQnp9sEIULALh2y3WyMI,1102
22
- rpa_suite-1.5.8.dist-info/METADATA,sha256=losVczz4q2NzB6P_Z6wrNkX9tneK8J4m9FpJaerGpHQ,13657
23
- rpa_suite-1.5.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
24
- rpa_suite-1.5.8.dist-info/top_level.txt,sha256=HYkDtg-kJNAr3F2XAIPyJ-QBbNhk7q6jrqsFt10lz4Y,10
25
- rpa_suite-1.5.8.dist-info/RECORD,,