DE-Lib 0.0.36.4__py3-none-any.whl → 0.0.37__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.
DE_Lib/DataBase/MsSql.py CHANGED
@@ -1,4 +1,4 @@
1
- import pymssql as mssql
1
+ import pymssql as mssql ## biblioteca suportada ate a versao 3.9 ou 3.10 do python
2
2
 
3
3
  from DE_Lib.Utils import Generic
4
4
 
@@ -15,7 +15,7 @@ class MSSQL:
15
15
  msg, conn = None, None
16
16
  try:
17
17
  # Efetuando a conexao com a instancia do BANCO
18
- conn = mssql.connect(user=string_connect["username"], password=string_connect["password"], database=string_connect["instance"], server=string_connect["host"])
18
+ result = mssql.connect(user=string_connect["username"], password=string_connect["password"], database=string_connect["instance"], server=string_connect["host"])
19
19
  self._connection_is_valid = True
20
20
  self._cnn = result
21
21
  self.__database_error = f"""{json.dumps(string_connect, indent=4).replace(string_connect["password"], "******")}\nConexao bem sucedida!"""
DE_Lib/Utils/Generic.py CHANGED
@@ -5,6 +5,9 @@ import random as rd
5
5
  import re
6
6
  import datetime as dt
7
7
  import sys
8
+ import os
9
+
10
+ from docutils.io import error_string
8
11
 
9
12
 
10
13
  class GENERIC:
@@ -263,6 +266,21 @@ class GENERIC:
263
266
  result = False
264
267
  finally:
265
268
  return result
269
+
270
+ @staticmethod
271
+ def get_file(filename: str, encoding: str = "utf-8"):
272
+ msg, result = None, None
273
+ try:
274
+ if os.path.exists(filename):
275
+ fh = open(filename, 'r', encoding=encoding)
276
+ result = fh.read()
277
+ except Exception as error:
278
+ msg = error
279
+ result = msg
280
+ finally:
281
+ return result
282
+
283
+
266
284
  # endregion
267
285
 
268
286
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: DE_Lib
3
- Version: 0.0.36.4
3
+ Version: 0.0.37
4
4
  Summary: Biblioteca de funcionalidades
5
5
  Home-page: https://github.com/DE-DATAx/DAX_DB.git
6
6
  Author: Almir J Gomes
@@ -5,7 +5,7 @@ DE_Lib/DataBase/Cache.py,sha256=IpTJCVCrtm8Et4U-_AaWoT_2vf7mBqdzYrWDXbpOORE,3171
5
5
  DE_Lib/DataBase/Firebird.py,sha256=dXjt3ImVtdiW99NAHcDIzZhGHF_YIyn4RJbM2QR4g7s,1898
6
6
  DE_Lib/DataBase/Informix.py,sha256=jXqPggYu8PjGrqtxMHwlCsqF5rK03olas5yVMH0Ndkw,1559
7
7
  DE_Lib/DataBase/Metadata.py,sha256=j0iJm26Sf0QvsYpN61hfwkllyW2EOA2XoFnSzEo9plE,3274
8
- DE_Lib/DataBase/MsSql.py,sha256=tVx7fdFkw1ZNhfjqw-KuyHtT-hqJ9ZNCR2iU_ogSUVk,1640
8
+ DE_Lib/DataBase/MsSql.py,sha256=8_qk1iqdckg0uNgZ1CKvvr7md7tXb844KmUrE-gmKRM,1701
9
9
  DE_Lib/DataBase/MySql.py,sha256=SWLJMaB30EBqaz32xwMBbc3lnemDPpF2kkkf5umlL3k,2534
10
10
  DE_Lib/DataBase/Oracle.py,sha256=n9ub6J6zNX4z62pUWjut3PGxXzLDZQ9jVhZ6eGzFPEw,9704
11
11
  DE_Lib/DataBase/OracleDDL.py,sha256=8PDTjR52Igtj-FyPQvFUBRjTlXB7crMNB8Xh5LncB_Q,3785
@@ -28,7 +28,7 @@ DE_Lib/Log/Log.py,sha256=NyraX9ZpM7XJN4S4o5nYaFdOTH35EAFP9w7GaTFrflk,18839
28
28
  DE_Lib/Log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  DE_Lib/Utils/Colors.py,sha256=REjcEK2QuhAo7RzRtHtib8EDMf-12TIsZDGJUCfuaTY,5984
30
30
  DE_Lib/Utils/DateUtils.py,sha256=Xl4PIxj66nqj11WAKEzPAc_SGtVzheg97D--jdJEAjc,7818
31
- DE_Lib/Utils/Generic.py,sha256=q-9_uz0ixhTxZpw9f0b1OfwbkLfaKiMFqgGi9OhuA38,9179
31
+ DE_Lib/Utils/Generic.py,sha256=pdrZOfmOEhzUcSnSS9rY6a4-N7jwXbp-tgF6wmIDQ3Q,9633
32
32
  DE_Lib/Utils/Sql.py,sha256=KOEfISWTF4MCydFXlO4z5z-gigU63yH-3eNXK_ss7JI,2646
33
33
  DE_Lib/Utils/System.py,sha256=0ICuCbN9ElNKL6XOd8mtwdiaooN5SRnMwKkMnTd5m_0,3405
34
34
  DE_Lib/Utils/WebHook.py,sha256=dHGP-20z4Q1_FapitEFBiiMlA8fIFlgf9QT4c5pnWfQ,713
@@ -42,8 +42,8 @@ DE_Lib/Utils/Cipher/Gcm.py,sha256=fOuCVOyd4sGv389E91yqomujKTtFZu6CyhySrmQKVfY,23
42
42
  DE_Lib/Utils/Cipher/Pbkdf2.py,sha256=hRkgf0Fo5hV1gLbWlFGFzhYYUjPEqgpB2R-pPw7N2F8,1210
43
43
  DE_Lib/Utils/Cipher/Rsa.py,sha256=MYG1YsGuq-Q-MoF6pmeMD0TyxMTwt6tuUaLvXcmzQ2k,4126
44
44
  DE_Lib/Utils/Cipher/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
- de_lib-0.0.36.4.dist-info/licenses/LICENCE,sha256=Qv2ilebwoUtMJnRsZwRy729xS5JZQzLauJ0tQzkAkTA,1088
46
- de_lib-0.0.36.4.dist-info/METADATA,sha256=MxYddukkChfteqTePzpUlPyH7wXLsNPg_5Odq2UOjGs,2289
47
- de_lib-0.0.36.4.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
48
- de_lib-0.0.36.4.dist-info/top_level.txt,sha256=yI9fdM_jkhCz_sykPZQbfeUbQ1FRMt-xjv9fJ6YZVLE,7
49
- de_lib-0.0.36.4.dist-info/RECORD,,
45
+ de_lib-0.0.37.dist-info/licenses/LICENCE,sha256=Qv2ilebwoUtMJnRsZwRy729xS5JZQzLauJ0tQzkAkTA,1088
46
+ de_lib-0.0.37.dist-info/METADATA,sha256=yT178aCbFf2pKrWkUnqKzRoJ8a_MwuJpbvjVpCxYIIA,2287
47
+ de_lib-0.0.37.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
+ de_lib-0.0.37.dist-info/top_level.txt,sha256=yI9fdM_jkhCz_sykPZQbfeUbQ1FRMt-xjv9fJ6YZVLE,7
49
+ de_lib-0.0.37.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5