rpa-suite 1.6.2__py3-none-any.whl → 1.6.3__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 +1 -1
- rpa_suite/core/__init__.py +5 -1
- rpa_suite/core/artemis.py +445 -0
- rpa_suite/core/asyncrun.py +15 -8
- rpa_suite/core/browser.py +44 -41
- rpa_suite/core/clock.py +46 -13
- rpa_suite/core/date.py +41 -16
- rpa_suite/core/dir.py +29 -72
- rpa_suite/core/email.py +26 -15
- rpa_suite/core/file.py +46 -43
- rpa_suite/core/iris.py +87 -79
- rpa_suite/core/log.py +134 -46
- rpa_suite/core/parallel.py +185 -182
- rpa_suite/core/print.py +119 -96
- rpa_suite/core/regex.py +26 -26
- rpa_suite/core/validate.py +20 -76
- rpa_suite/functions/__init__.py +1 -1
- rpa_suite/suite.py +13 -1
- rpa_suite/utils/__init__.py +1 -1
- rpa_suite/utils/system.py +64 -61
- {rpa_suite-1.6.2.dist-info → rpa_suite-1.6.3.dist-info}/METADATA +4 -16
- rpa_suite-1.6.3.dist-info/RECORD +27 -0
- rpa_suite-1.6.2.dist-info/RECORD +0 -26
- {rpa_suite-1.6.2.dist-info → rpa_suite-1.6.3.dist-info}/WHEEL +0 -0
- {rpa_suite-1.6.2.dist-info → rpa_suite-1.6.3.dist-info}/licenses/LICENSE +0 -0
- {rpa_suite-1.6.2.dist-info → rpa_suite-1.6.3.dist-info}/top_level.txt +0 -0
rpa_suite/utils/system.py
CHANGED
@@ -8,109 +8,113 @@ import ctypes
|
|
8
8
|
# imports internal
|
9
9
|
from rpa_suite.functions._printer import error_print, success_print
|
10
10
|
|
11
|
+
class UtilsError(Exception):
|
12
|
+
"""Custom exception for Utils errors."""
|
13
|
+
def __init__(self, message):
|
14
|
+
super().__init__(f'UtilsError: {message}')
|
11
15
|
|
12
16
|
class Utils:
|
13
17
|
"""
|
14
|
-
|
18
|
+
Utility class for system configuration and directory management.
|
15
19
|
|
16
|
-
|
20
|
+
Provides methods for manipulating import paths and system configurations.
|
17
21
|
"""
|
18
22
|
|
19
23
|
def __init__(self):
|
20
24
|
"""
|
21
|
-
|
25
|
+
Initializes the Utils class.
|
22
26
|
|
23
|
-
|
27
|
+
Does not require specific initialization parameters.
|
24
28
|
"""
|
25
29
|
try:
|
26
30
|
pass
|
27
31
|
except Exception as e:
|
28
|
-
|
32
|
+
UtilsError(f"Error during Utils class initialization: {str(e)}.")
|
29
33
|
|
30
34
|
def set_importable_dir(self, display_message: bool = False) -> None:
|
31
35
|
"""
|
32
|
-
|
36
|
+
Configures the current directory as importable by adding it to the system path.
|
33
37
|
|
34
|
-
|
35
|
-
|
38
|
+
Adds the parent directory of the current module to sys.path, allowing
|
39
|
+
dynamic imports of local modules.
|
36
40
|
|
37
|
-
|
41
|
+
Parameters:
|
38
42
|
----------
|
39
|
-
display_message : bool,
|
40
|
-
|
41
|
-
|
43
|
+
display_message : bool, optional
|
44
|
+
If True, displays a success message after setting the directory.
|
45
|
+
Default is False.
|
42
46
|
|
43
|
-
|
47
|
+
Returns:
|
44
48
|
--------
|
45
49
|
None
|
46
50
|
|
47
|
-
|
48
|
-
|
49
|
-
|
51
|
+
Exceptions:
|
52
|
+
-----------
|
53
|
+
Captures and logs any errors during the configuration process.
|
50
54
|
"""
|
51
55
|
|
52
56
|
try:
|
53
57
|
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
54
58
|
|
55
59
|
if display_message:
|
56
|
-
success_print("
|
60
|
+
success_print("Directory successfully configured for import!")
|
57
61
|
|
58
62
|
except Exception as e:
|
59
|
-
|
63
|
+
UtilsError(f"Error configuring importable directory: {str(e)}.")
|
60
64
|
|
61
65
|
|
62
66
|
class KeepSessionActive:
|
63
67
|
"""
|
64
|
-
|
68
|
+
Advanced context manager to prevent screen lock on Windows.
|
65
69
|
|
66
|
-
|
67
|
-
|
70
|
+
Uses Windows API calls to keep the system active during
|
71
|
+
critical task execution, preventing suspension or screen lock.
|
68
72
|
|
69
|
-
|
70
|
-
|
73
|
+
Class Attributes:
|
74
|
+
----------------
|
71
75
|
ES_CONTINUOUS : int
|
72
|
-
Flag
|
76
|
+
Flag to maintain the current system execution state.
|
73
77
|
ES_SYSTEM_REQUIRED : int
|
74
|
-
Flag
|
78
|
+
Flag to prevent system suspension.
|
75
79
|
ES_DISPLAY_REQUIRED : int
|
76
|
-
Flag
|
80
|
+
Flag to keep the display active.
|
77
81
|
|
78
|
-
|
79
|
-
|
82
|
+
Usage Example:
|
83
|
+
-------------
|
80
84
|
with KeepSessionActive():
|
81
|
-
#
|
82
|
-
|
85
|
+
# Code that requires the system to remain active
|
86
|
+
perform_long_task()
|
83
87
|
"""
|
84
88
|
|
85
89
|
def __init__(self) -> None:
|
86
90
|
"""
|
87
|
-
|
91
|
+
Initializes system execution state settings.
|
88
92
|
|
89
|
-
|
90
|
-
|
93
|
+
Configures Windows-specific constants for power control
|
94
|
+
and operating system state management.
|
91
95
|
"""
|
92
96
|
try:
|
93
97
|
self.ES_CONTINUOUS = 0x80000000
|
94
98
|
self.ES_SYSTEM_REQUIRED = 0x00000001
|
95
99
|
self.ES_DISPLAY_REQUIRED = 0x00000002
|
96
100
|
except Exception as e:
|
97
|
-
|
101
|
+
UtilsError(f"Error initializing KeepSessionActive: {str(e)}.")
|
98
102
|
|
99
103
|
def __enter__(self) -> None:
|
100
104
|
"""
|
101
|
-
|
105
|
+
Configures execution state to prevent screen lock.
|
102
106
|
|
103
|
-
|
104
|
-
|
107
|
+
Uses Windows API call to keep system and display active
|
108
|
+
during code block execution.
|
105
109
|
|
106
|
-
|
110
|
+
Returns:
|
107
111
|
--------
|
108
112
|
KeepSessionActive
|
109
|
-
|
113
|
+
The context manager instance itself.
|
110
114
|
|
111
|
-
|
112
|
-
|
113
|
-
|
115
|
+
Exceptions:
|
116
|
+
-----------
|
117
|
+
Captures and logs any errors during state configuration.
|
114
118
|
"""
|
115
119
|
try:
|
116
120
|
ctypes.windll.kernel32.SetThreadExecutionState(
|
@@ -118,40 +122,39 @@ class KeepSessionActive:
|
|
118
122
|
)
|
119
123
|
return self
|
120
124
|
except Exception as e:
|
121
|
-
|
122
|
-
return self
|
125
|
+
UtilsError(f"Error configuring execution state: {str(e)}.")
|
123
126
|
|
124
127
|
def __exit__(self, exc_type, exc_val, exc_tb) -> None:
|
125
128
|
"""
|
126
|
-
|
129
|
+
Restores default system power settings.
|
127
130
|
|
128
|
-
|
129
|
-
|
131
|
+
Method called automatically when exiting the context block,
|
132
|
+
reverting execution state settings to default.
|
130
133
|
|
131
|
-
|
134
|
+
Parameters:
|
132
135
|
----------
|
133
|
-
exc_type : type,
|
134
|
-
|
135
|
-
exc_val : Exception,
|
136
|
-
|
137
|
-
exc_tb : traceback,
|
138
|
-
Traceback
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
136
|
+
exc_type : type, optional
|
137
|
+
Type of exception that may have occurred.
|
138
|
+
exc_val : Exception, optional
|
139
|
+
Value of exception that may have occurred.
|
140
|
+
exc_tb : traceback, optional
|
141
|
+
Traceback of exception that may have occurred.
|
142
|
+
|
143
|
+
Exceptions:
|
144
|
+
-----------
|
145
|
+
Captures and logs any errors during state restoration.
|
143
146
|
"""
|
144
147
|
try:
|
145
148
|
ctypes.windll.kernel32.SetThreadExecutionState(self.ES_CONTINUOUS)
|
146
149
|
except Exception as e:
|
147
|
-
|
150
|
+
UtilsError(f"Error restoring execution state: {str(e)}.")
|
148
151
|
|
149
152
|
|
150
153
|
class Tools(Utils):
|
151
154
|
"""
|
152
|
-
|
155
|
+
Utility class for system configuration and directory management.
|
153
156
|
|
154
|
-
|
157
|
+
Provides methods for manipulating import paths and system configurations.
|
155
158
|
"""
|
156
159
|
|
157
160
|
keep_session_active: KeepSessionActive = KeepSessionActive
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: rpa_suite
|
3
|
-
Version: 1.6.
|
3
|
+
Version: 1.6.3
|
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
|
@@ -292,33 +292,21 @@ O módulo principal do rpa-suite é dividido em categorias. Cada categoria cont
|
|
292
292
|
|
293
293
|
## Release Notes
|
294
294
|
|
295
|
-
### Versão: **Beta 1.6.
|
295
|
+
### Versão: **Beta 1.6.3**
|
296
296
|
|
297
297
|
- **Data de Lançamento:** *20/02/2024*
|
298
|
-
- **Última Atualização:**
|
298
|
+
- **Última Atualização:** 16/09/2025
|
299
299
|
- **Status:** Em desenvolvimento
|
300
300
|
|
301
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.
|
302
302
|
|
303
303
|
### Notas:
|
304
|
-
- atualização 1.6.
|
304
|
+
- atualização 1.6.3
|
305
305
|
- Adição Módulo: Iris (OCR-IA)
|
306
306
|
- Feat.: leitura de documento (aceita multiplos formatos)
|
307
307
|
- Feat.: leitura em lote (multiplos docmumentos em uma unica chamada)
|
308
308
|
- Melhoria de docstrings
|
309
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
|
320
|
-
|
321
|
-
|
322
310
|
## Mais Sobre
|
323
311
|
|
324
312
|
Para mais informações, visite os links abaixo:
|
@@ -0,0 +1,27 @@
|
|
1
|
+
rpa_suite/__init__.py,sha256=oFipolNqMhr7shYERyO8R8YUGJzQwepnHDIL2VVX6FU,2915
|
2
|
+
rpa_suite/suite.py,sha256=yP-5_YrB_DujKpZXfAcIqgNV5BeTjNbNxB-Jst9UJJo,12361
|
3
|
+
rpa_suite/core/__init__.py,sha256=TVOHv0U3sDTtqrvu2jg0_URtEI1Si3EyNW-N7eEnXqo,1966
|
4
|
+
rpa_suite/core/artemis.py,sha256=QjyTxXK48kCJpwpGBIfHupGSpmwhCsMDuWwMuxSXPRE,17784
|
5
|
+
rpa_suite/core/asyncrun.py,sha256=VP7x5KN_qxXUL0AdA6evklPgHCRRqgyyqhWYuQHFye8,4551
|
6
|
+
rpa_suite/core/browser.py,sha256=37desqhn4Vo8dSbz9KSNwLFSmY-WRW7rh0HIqOMjmN4,14566
|
7
|
+
rpa_suite/core/clock.py,sha256=czjUN4m1NyPxD9eO59DRfn7IRbycXlrJSFwePBnBbSY,14353
|
8
|
+
rpa_suite/core/date.py,sha256=dvtXU43qK8zbcwmpdpSYM3Y7LtQAUR8ByB7uFw7UTHk,7411
|
9
|
+
rpa_suite/core/dir.py,sha256=8JQg56W8kho8Kk9D78YCNYQmAirBSudvOjVTpO-dbYw,8032
|
10
|
+
rpa_suite/core/email.py,sha256=EaJy8keVfRYNUdcIWz2ri9To-W8iZPqiMleDQt9KE3I,8914
|
11
|
+
rpa_suite/core/file.py,sha256=aBsnoHH0QjyNnhW0KDxF7TrLUuI51Rz7R4sfOitZe_g,11398
|
12
|
+
rpa_suite/core/iris.py,sha256=qhQqVoJe_PQGvZt0e9_-VXNXVN16_UM0PxF_U8nZuJ0,9007
|
13
|
+
rpa_suite/core/log.py,sha256=rsQ-sSi0dahvMBUvRPDE72nR9lBzncRS5mf9eqc8U1E,10474
|
14
|
+
rpa_suite/core/parallel.py,sha256=hcycdS8TZU8R3DsFAukBBOc5_IutLDu8PlaH3K1WJbs,12705
|
15
|
+
rpa_suite/core/print.py,sha256=-0oUO3sVTft2_dc6E4OkchyZLR2zJPHne4ZOn65rw20,6533
|
16
|
+
rpa_suite/core/regex.py,sha256=f5aDw3pZ7xG7qpsTzHIr6nlD93FZTBXMMG--v448oY0,3012
|
17
|
+
rpa_suite/core/validate.py,sha256=XL8y80GK4C_kisg6Lzc0zV4XhfBHiICyn78VCnT-aqc,7567
|
18
|
+
rpa_suite/functions/__create_ss_dir.py,sha256=kaRotLlYDCQGKtv9nd8zZUorQmHYGbHmOEWJ1DZBBYc,3426
|
19
|
+
rpa_suite/functions/__init__.py,sha256=3e7nQAFAG-w5WnbqggSnBnFph3ff4lalvK4Wh5QkrFo,57
|
20
|
+
rpa_suite/functions/_printer.py,sha256=gj7dwOt4roSj2iwOGWeGgUD3JVr7h4UESyCg9CmrieA,3946
|
21
|
+
rpa_suite/utils/__init__.py,sha256=Y0R89MMt7aiKQDn3w463uB_U0C4GcgwTAtU8-jCUI1Q,729
|
22
|
+
rpa_suite/utils/system.py,sha256=3g3Pwt-bFUPIY2UQzN7EVSH7OJ_cd35Vs8x3w1I24jk,4938
|
23
|
+
rpa_suite-1.6.3.dist-info/licenses/LICENSE,sha256=5D8PIbs31iGd9i1_MDNg4SzaQnp9sEIULALh2y3WyMI,1102
|
24
|
+
rpa_suite-1.6.3.dist-info/METADATA,sha256=CWjnoWK7Fkc0RJhFp_0nNb-1HbP5qkJeObD9qFvGTiQ,13203
|
25
|
+
rpa_suite-1.6.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
26
|
+
rpa_suite-1.6.3.dist-info/top_level.txt,sha256=HYkDtg-kJNAr3F2XAIPyJ-QBbNhk7q6jrqsFt10lz4Y,10
|
27
|
+
rpa_suite-1.6.3.dist-info/RECORD,,
|
rpa_suite-1.6.2.dist-info/RECORD
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
rpa_suite/__init__.py,sha256=olciiOHwT6n0OtAxGp2QH-GTLuS0IvfvnnJOObiKIMo,2915
|
2
|
-
rpa_suite/suite.py,sha256=ylGDXRhyIWM3wibmG_R0UbeHKz5-hYUaTT92LvA9IaU,11818
|
3
|
-
rpa_suite/core/__init__.py,sha256=dmW1RHmaX17QDJ-7lZgZys6JcY1o0kaoplAWSOnZpXY,1858
|
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=0ciu5QTRABmb5DVNmaa0gAU8AjJrTJPGv83kD5NoX1w,8916
|
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=7u63cRyow2OYQMt6Ph5uYImM_aUeMqdMaOvvO5v698Y,57
|
19
|
-
rpa_suite/functions/_printer.py,sha256=gj7dwOt4roSj2iwOGWeGgUD3JVr7h4UESyCg9CmrieA,3946
|
20
|
-
rpa_suite/utils/__init__.py,sha256=VAPzxR_aW-8kWsAUYzvrFdkH_aRLXywTUvj_qah9GwM,729
|
21
|
-
rpa_suite/utils/system.py,sha256=kkTsjwBQ-8_G_6l-0tuwkpmeI3KVssRZ7QAiYlR3vt0,5185
|
22
|
-
rpa_suite-1.6.2.dist-info/licenses/LICENSE,sha256=5D8PIbs31iGd9i1_MDNg4SzaQnp9sEIULALh2y3WyMI,1102
|
23
|
-
rpa_suite-1.6.2.dist-info/METADATA,sha256=P7t3b0YagF5azd8NreHkLKsi4LFktUyFzXMjTP0LzgE,13383
|
24
|
-
rpa_suite-1.6.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
25
|
-
rpa_suite-1.6.2.dist-info/top_level.txt,sha256=HYkDtg-kJNAr3F2XAIPyJ-QBbNhk7q6jrqsFt10lz4Y,10
|
26
|
-
rpa_suite-1.6.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|