csc-cia-stne 0.1.17__tar.gz → 0.1.18__tar.gz
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.
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/PKG-INFO +1 -1
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/pyproject.toml +1 -1
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/ftp.py +21 -7
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne.egg-info/PKG-INFO +1 -1
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/LICENCE +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/README.md +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/README_PYPI.md +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/setup.cfg +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/__init__.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/bc_correios.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/bc_sta.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/email.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/gcp_bigquery.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/gcp_bucket.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/google_drive.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/karavela.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/logger_json.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/logger_rich.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/provio.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/servicenow.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/slack.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/stne_admin.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/__init__.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/__init__.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_b64.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_converters.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_datetime.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_delete.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_get_secret.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_recriar_pastas.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_settings.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_titulo.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_validate_json.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/validations/GcpBigQueryValidator.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/validations/GoogleDriveValidator.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/validations/ServiceNowValidator.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/validations/__init__.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/validations/ftp.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/validations/gcp_bucket.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/validations/waccess.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/validations/web_validator.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/web_screen/__init__.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/web_screen/web_screen_abstract.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/web_screen/web_screen_botcity.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/web_screen/web_screen_selenium.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/wacess.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/web.py +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne.egg-info/SOURCES.txt +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne.egg-info/dependency_links.txt +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne.egg-info/requires.txt +0 -0
- {csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne.egg-info/top_level.txt +0 -0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "csc_cia_stne"
|
7
|
-
version = "0.1.
|
7
|
+
version = "0.1.18"
|
8
8
|
license = { text = "MIT" }
|
9
9
|
description = "Biblioteca do time CSC-CIA utilizada no desenvolvimento de RPAs"
|
10
10
|
keywords = ["karavela", "csc", "cia", "stone", "rpa", "botcity", "stne"]
|
@@ -8,7 +8,7 @@ from .utilitarios.validations.ftp import InitParamsValidator,UploadDownloadValid
|
|
8
8
|
|
9
9
|
class FTP():
|
10
10
|
|
11
|
-
def __init__(self, host:str , user:str , password:str , timeout:int=30, port:
|
11
|
+
def __init__(self, host:str , user:str , password:str , timeout:int=30, port:int=21, tls:bool=True, ssl:bool=True, verify_ssl:bool=False, verify_host:bool=False, tryouts:int=3, sftp:bool=False):
|
12
12
|
|
13
13
|
self.host = host
|
14
14
|
self.user = user
|
@@ -20,6 +20,7 @@ class FTP():
|
|
20
20
|
self.verify_ssl = verify_ssl
|
21
21
|
self.verify_host = verify_host
|
22
22
|
self.tryouts = tryouts
|
23
|
+
self.sftp = sftp
|
23
24
|
|
24
25
|
try:
|
25
26
|
|
@@ -92,7 +93,7 @@ class FTP():
|
|
92
93
|
|
93
94
|
connection_ftp = pycurl.Curl()
|
94
95
|
|
95
|
-
connection_ftp.setopt(connection_ftp.USERPWD, f"{self.user}:{self.password}")
|
96
|
+
connection_ftp.setopt(connection_ftp.USERPWD, f"{self.user}:{self.password}".encode("utf-8"))
|
96
97
|
|
97
98
|
connection_ftp.setopt(connection_ftp.CONNECTTIMEOUT, self.timeout) # Tempo limite para conexão
|
98
99
|
|
@@ -156,13 +157,20 @@ class FTP():
|
|
156
157
|
|
157
158
|
raise ValueError(f"Erro na validação dos parâmetros de upload/download: {str(e)}")
|
158
159
|
|
159
|
-
|
160
|
+
|
161
|
+
local_path = os.path.join(os.getcwd(), filename)
|
160
162
|
|
161
163
|
connection_ftp = self._login_server()
|
162
164
|
|
163
|
-
remote_path = f"{filepathftp}{filename}"
|
165
|
+
remote_path = f"{filepathftp}{filename.split('/')[-1]}"
|
166
|
+
|
167
|
+
if self.sftp:
|
168
|
+
|
169
|
+
ftp_url = f"sftp://{self.host}:{self.port}{remote_path}"
|
170
|
+
|
171
|
+
else:
|
164
172
|
|
165
|
-
|
173
|
+
ftp_url = f"ftp://{self.host}:{self.port}{remote_path}"
|
166
174
|
|
167
175
|
status_upload = True
|
168
176
|
|
@@ -178,7 +186,7 @@ class FTP():
|
|
178
186
|
|
179
187
|
try:
|
180
188
|
|
181
|
-
with open(
|
189
|
+
with open(local_path, methodfile) as file:
|
182
190
|
|
183
191
|
connection_ftp.setopt(connection_ftp.URL, ftp_url)
|
184
192
|
|
@@ -262,7 +270,13 @@ class FTP():
|
|
262
270
|
|
263
271
|
connection_ftp = self._login_server()
|
264
272
|
|
265
|
-
|
273
|
+
if self.sftp:
|
274
|
+
|
275
|
+
ftp_url = f"sftp://{self.host}:{port}{remote_path}"
|
276
|
+
|
277
|
+
else:
|
278
|
+
|
279
|
+
ftp_url = f"ftp://{self.host}:{port}{remote_path}"
|
266
280
|
|
267
281
|
for try_out in range(self.tryouts):
|
268
282
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/__init__.py
RENAMED
File without changes
|
{csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_b64.py
RENAMED
File without changes
|
File without changes
|
{csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_datetime.py
RENAMED
File without changes
|
{csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_delete.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_settings.py
RENAMED
File without changes
|
{csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/functions/func_titulo.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/validations/__init__.py
RENAMED
File without changes
|
File without changes
|
{csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/validations/gcp_bucket.py
RENAMED
File without changes
|
{csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/validations/waccess.py
RENAMED
File without changes
|
File without changes
|
{csc_cia_stne-0.1.17 → csc_cia_stne-0.1.18}/src/csc_cia_stne/utilitarios/web_screen/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|