rpa-suite 1.5.6__py3-none-any.whl → 1.5.7__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/core/log.py +32 -13
- rpa_suite/suite.py +5 -2
- rpa_suite/utils/__init__.py +2 -0
- rpa_suite/utils/system.py +6 -0
- {rpa_suite-1.5.6.dist-info → rpa_suite-1.5.7.dist-info}/METADATA +3 -3
- {rpa_suite-1.5.6.dist-info → rpa_suite-1.5.7.dist-info}/RECORD +9 -9
- {rpa_suite-1.5.6.dist-info → rpa_suite-1.5.7.dist-info}/WHEEL +1 -1
- {rpa_suite-1.5.6.dist-info → rpa_suite-1.5.7.dist-info}/licenses/LICENSE +0 -0
- {rpa_suite-1.5.6.dist-info → rpa_suite-1.5.7.dist-info}/top_level.txt +0 -0
rpa_suite/core/log.py
CHANGED
@@ -37,13 +37,10 @@ class CustomHandler:
|
|
37
37
|
|
38
38
|
class CustomFormatter:
|
39
39
|
def format(self, record):
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
filename = os.path.join(foldername, filename)
|
45
|
-
lineno = frame.f_lineno
|
46
|
-
format_string = "<green>{time:DD.MM.YY.HH:mm}</green> <level>{level: <8}</level> <level>{message}</level>\n"
|
40
|
+
# Use the info from record["extra"] which is set in Log._log to the caller's file and line
|
41
|
+
filename = record["extra"].get("filename", "")
|
42
|
+
lineno = record["extra"].get("lineno", "")
|
43
|
+
format_string = "<green>{time:DD.MM.YY.HH:mm}</green> <level>{level: <8}</level> <green>{filename}</green>:<cyan>{lineno: <4}</cyan> <level>{message}</level>\n"
|
47
44
|
log_msg = format_string.format(
|
48
45
|
time=record["time"],
|
49
46
|
level=record["level"].name,
|
@@ -101,7 +98,7 @@ class Log:
|
|
101
98
|
file_handler = os.path.join(self.full_path, f"{self.name_file_log}.log")
|
102
99
|
self.logger.remove()
|
103
100
|
|
104
|
-
log_format = "<green>{time:DD.MM.YY.HH:mm}</green> <level>{level: <8}</level> <green>{extra[filename]}</green
|
101
|
+
log_format = "<green>{time:DD.MM.YY.HH:mm}</green> <level>{level: <8}</level> <green>{extra[filename]}</green>:<cyan>{extra[lineno]: <4}</cyan> <level>{message}</level>"
|
105
102
|
|
106
103
|
formatter = CustomFormatter()
|
107
104
|
|
@@ -123,14 +120,36 @@ class Log:
|
|
123
120
|
return None
|
124
121
|
|
125
122
|
def _log(self, level: str, msg: str):
|
123
|
+
"""
|
124
|
+
docstring
|
125
|
+
"""
|
126
126
|
try:
|
127
|
-
frame
|
127
|
+
# Find the first frame that's not from this log.py file
|
128
|
+
frame = inspect.currentframe()
|
129
|
+
current_file = os.path.normpath(__file__)
|
130
|
+
|
131
|
+
while frame:
|
132
|
+
frame = frame.f_back
|
133
|
+
if frame and os.path.normpath(frame.f_code.co_filename) != current_file:
|
134
|
+
break
|
135
|
+
|
136
|
+
if not frame:
|
137
|
+
# Fallback if we can't find external caller
|
138
|
+
frame = inspect.currentframe().f_back.f_back
|
139
|
+
|
128
140
|
full_path_filename = frame.f_code.co_filename
|
129
|
-
|
130
|
-
|
131
|
-
|
141
|
+
|
142
|
+
# Normalize path to use os.sep
|
143
|
+
full_path_filename = os.path.normpath(full_path_filename)
|
144
|
+
|
145
|
+
# Get the last two components: parent folder and filename
|
146
|
+
parent_folder = os.path.basename(os.path.dirname(full_path_filename))
|
147
|
+
file_name = os.path.basename(full_path_filename)
|
148
|
+
display_filename = f"{parent_folder}/{file_name}"
|
149
|
+
|
132
150
|
lineno = frame.f_lineno
|
133
|
-
|
151
|
+
|
152
|
+
self.logger.bind(filename=display_filename, lineno=lineno).log(level, msg)
|
134
153
|
except Exception as e:
|
135
154
|
error_print(f"Erro durante a função de log! Error: {str(e)}")
|
136
155
|
|
rpa_suite/suite.py
CHANGED
@@ -16,7 +16,7 @@ from .core.asyncrun import AsyncRunner
|
|
16
16
|
|
17
17
|
# imports external
|
18
18
|
from colorama import Fore
|
19
|
-
import
|
19
|
+
from importlib.metadata import version
|
20
20
|
|
21
21
|
# imports third-party
|
22
22
|
import subprocess
|
@@ -162,7 +162,10 @@ class Suite:
|
|
162
162
|
|
163
163
|
# VARIABLES INTERNAL
|
164
164
|
try:
|
165
|
-
__version__ = pkg_resources.get_distribution("rpa_suite").version
|
165
|
+
# old: __version__ = pkg_resources.get_distribution("rpa_suite").version
|
166
|
+
|
167
|
+
__version__ = version("package_name")
|
168
|
+
|
166
169
|
except Exception:
|
167
170
|
__version__ = "unknown"
|
168
171
|
|
rpa_suite/utils/__init__.py
CHANGED
@@ -9,5 +9,7 @@ pt-br
|
|
9
9
|
O módulo de utilitários da rpa-suite fornece uma coleção de funções e classes utilitárias que facilitam diversas tarefas na automação de processos. Inclui métodos auxiliares para registro de log, manipulação de arquivos e outras operações comuns que aprimoram a funcionalidade e a usabilidade da RPA Suite.
|
10
10
|
|
11
11
|
"""
|
12
|
+
from .system import Tools
|
13
|
+
|
12
14
|
|
13
15
|
__version__ = '1.5.5'
|
rpa_suite/utils/system.py
CHANGED
@@ -148,3 +148,9 @@ class KeepSessionActive:
|
|
148
148
|
ctypes.windll.kernel32.SetThreadExecutionState(self.ES_CONTINUOUS)
|
149
149
|
except Exception as e:
|
150
150
|
error_print(f"Erro ao restaurar estado de execução: {str(e)}")
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
class Tools(Utils):
|
155
|
+
|
156
|
+
KeepSessionActive = KeepSessionActive
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: rpa_suite
|
3
|
-
Version: 1.5.
|
3
|
+
Version: 1.5.7
|
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
|
@@ -284,10 +284,10 @@ O módulo principal do rpa-suite é dividido em categorias. Cada categoria cont
|
|
284
284
|
|
285
285
|
## Release Notes
|
286
286
|
|
287
|
-
### Versão: **Beta 1.5.
|
287
|
+
### Versão: **Beta 1.5.7**
|
288
288
|
|
289
289
|
- **Data de Lançamento:** *20/02/2024*
|
290
|
-
- **Última Atualização:**
|
290
|
+
- **Última Atualização:** 28/05/2025
|
291
291
|
- **Status:** Em desenvolvimento
|
292
292
|
|
293
293
|
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.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
rpa_suite/__init__.py,sha256=PGlr0Y0NLLH1sarD1VTv-Tvm_uZPmo1Ar4LLncvUVFU,2365
|
2
|
-
rpa_suite/suite.py,sha256=
|
2
|
+
rpa_suite/suite.py,sha256=fIbli4MCBVKXvv5JFmzudcEZATYMFyvx9rIK9CceorI,10648
|
3
3
|
rpa_suite/core/__init__.py,sha256=clmYBLmsmFRXGMABUjIkV-dBe_OlviowszdIJEwS-yM,1748
|
4
4
|
rpa_suite/core/asyncrun.py,sha256=bE04H36V01LavLRzGMhaUDBrnwhwLLSqpzKRZjsHVnA,4195
|
5
5
|
rpa_suite/core/browser.py,sha256=tew_SaTBVsWZHi66O41GOLMrdoR1XvgQmtoBMjGa9iE,15009
|
@@ -8,7 +8,7 @@ rpa_suite/core/date.py,sha256=42Nwvyx-FBBImEyVhBGksmIZ9VSwyFqhQPVeEwSpmtc,6310
|
|
8
8
|
rpa_suite/core/dir.py,sha256=sN9R-XGIrySAyUYIB3XVHzaZR5ZqcX2Ag-pKZ6G3jpY,10301
|
9
9
|
rpa_suite/core/email.py,sha256=kH6wFPxekXxhqt4ry_gWOzVeV_YBSIzb_xr5CL9FR_8,8741
|
10
10
|
rpa_suite/core/file.py,sha256=plj_sC-j2j2IEQ5NRTssnSNPaPGLBg-RjPwGZPpWsIo,11441
|
11
|
-
rpa_suite/core/log.py,sha256=
|
11
|
+
rpa_suite/core/log.py,sha256=WAMGRwQr-zvl7eWR-JLJHQbq4NF4vN68MCc84QMnBfs,6568
|
12
12
|
rpa_suite/core/parallel.py,sha256=nmATr6KimkAplDeh-dGwP6iB9muJ7ygDQ3NoYkEYgIg,11709
|
13
13
|
rpa_suite/core/print.py,sha256=T-O4zaYzfPLKn5tEzgNrWOqRV_p4hAzT-c1Y3JDla24,5825
|
14
14
|
rpa_suite/core/regex.py,sha256=76NjtLaIFM4LuTWLAOusQoOcP_Rub_G2ol9H6CIkTMg,3324
|
@@ -16,10 +16,10 @@ rpa_suite/core/validate.py,sha256=gOISOwjCza-18kfpaZnWCrKj4aIk2s7U4mStBDUAC7E,10
|
|
16
16
|
rpa_suite/functions/__create_ss_dir.py,sha256=oAvZCMRgrBNUpaYGEiNlUFa1XiVYDfOqPb9M8ITxqG8,3482
|
17
17
|
rpa_suite/functions/__init__.py,sha256=nXet0AfuyaazPrJUzfCgE382hONS3QqxDLydo75J6NU,57
|
18
18
|
rpa_suite/functions/_printer.py,sha256=gj7dwOt4roSj2iwOGWeGgUD3JVr7h4UESyCg9CmrieA,3946
|
19
|
-
rpa_suite/utils/__init__.py,sha256=
|
20
|
-
rpa_suite/utils/system.py,sha256=
|
21
|
-
rpa_suite-1.5.
|
22
|
-
rpa_suite-1.5.
|
23
|
-
rpa_suite-1.5.
|
24
|
-
rpa_suite-1.5.
|
25
|
-
rpa_suite-1.5.
|
19
|
+
rpa_suite/utils/__init__.py,sha256=FeMyn0dSuj8gMBrvzk-61mkz4F_hPT6l--vDyMWjxYw,729
|
20
|
+
rpa_suite/utils/system.py,sha256=KUx3yisPr-eSnORgcBVcGUypoW-xef2e-l5odLAYrnQ,5012
|
21
|
+
rpa_suite-1.5.7.dist-info/licenses/LICENSE,sha256=5D8PIbs31iGd9i1_MDNg4SzaQnp9sEIULALh2y3WyMI,1102
|
22
|
+
rpa_suite-1.5.7.dist-info/METADATA,sha256=EcOxaInP0RQJUwwZwKprf7nSuc2f-61TpMsbxjZG2sU,13938
|
23
|
+
rpa_suite-1.5.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
24
|
+
rpa_suite-1.5.7.dist-info/top_level.txt,sha256=HYkDtg-kJNAr3F2XAIPyJ-QBbNhk7q6jrqsFt10lz4Y,10
|
25
|
+
rpa_suite-1.5.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|