berryworld 1.0.0.192676__py3-none-any.whl → 1.0.0.192758__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.
- berryworld/sql_connenction.py +6 -7
- {berryworld-1.0.0.192676.dist-info → berryworld-1.0.0.192758.dist-info}/METADATA +1 -1
- {berryworld-1.0.0.192676.dist-info → berryworld-1.0.0.192758.dist-info}/RECORD +6 -6
- {berryworld-1.0.0.192676.dist-info → berryworld-1.0.0.192758.dist-info}/WHEEL +0 -0
- {berryworld-1.0.0.192676.dist-info → berryworld-1.0.0.192758.dist-info}/licenses/LICENSE +0 -0
- {berryworld-1.0.0.192676.dist-info → berryworld-1.0.0.192758.dist-info}/top_level.txt +0 -0
berryworld/sql_connenction.py
CHANGED
|
@@ -9,8 +9,6 @@ import sqlalchemy as sa
|
|
|
9
9
|
from urllib import parse
|
|
10
10
|
from numbers import Number
|
|
11
11
|
|
|
12
|
-
from lief import exception
|
|
13
|
-
|
|
14
12
|
|
|
15
13
|
class SQLConnection:
|
|
16
14
|
""" Connect to Microsoft SQL """
|
|
@@ -96,8 +94,8 @@ class SQLConnection:
|
|
|
96
94
|
else:
|
|
97
95
|
db_name = os.environ.get("SQL-" + self.db_reference.upper() + '-DBNAME')
|
|
98
96
|
|
|
99
|
-
user_name = os.environ.get("
|
|
100
|
-
password = os.environ.get("
|
|
97
|
+
user_name = os.environ.get("SQL-" + self.db_reference.upper() + '-USERNAME')
|
|
98
|
+
password = os.environ.get("SQL-" + self.db_reference.upper() + '-PASSWORD')
|
|
101
99
|
|
|
102
100
|
return re.sub(r'(\\)\1*', r'\1', server_name), db_name, user_name, password
|
|
103
101
|
|
|
@@ -111,16 +109,17 @@ class SQLConnection:
|
|
|
111
109
|
database = str(self.db_name).lower().replace('primary;', '')
|
|
112
110
|
|
|
113
111
|
if self.master:
|
|
114
|
-
self.con_string = ('mssql+pyodbc://' + self.user_name + ':%s@' + self.
|
|
112
|
+
self.con_string = ('mssql+pyodbc://' + self.user_name + ':%s@' + self.server_name + '/master' +
|
|
115
113
|
'?driver=' + self.driver + '&trusted_connection=yes' + self.trusted_certificate +
|
|
116
114
|
self.encrypt)
|
|
117
115
|
self.engine = sa.create_engine(self.con_string % parse.quote_plus(self.password))
|
|
118
116
|
else:
|
|
119
|
-
self.con_string = ('mssql+pyodbc://' + self.user_name + ':%s@' + self.
|
|
117
|
+
self.con_string = ('mssql+pyodbc://' + self.user_name + ':%s@' + self.server_name + '/' + database +
|
|
120
118
|
'?driver=' + self.driver + self.trusted_certificate + self.encrypt)
|
|
121
119
|
self.engine = sa.create_engine(self.con_string % parse.quote_plus(self.password))
|
|
122
120
|
if not commit_as_transaction:
|
|
123
121
|
self.engine = self.engine.execution_options(isolation_level="AUTOCOMMIT")
|
|
122
|
+
|
|
124
123
|
self.con = self.engine.connect().connection
|
|
125
124
|
|
|
126
125
|
def open_write_connection(self, commit_as_transaction=True):
|
|
@@ -128,7 +127,7 @@ class SQLConnection:
|
|
|
128
127
|
:param commit_as_transaction: Indicate whether the connection will be done using the autocommit option or not
|
|
129
128
|
:return: The opened connection
|
|
130
129
|
"""
|
|
131
|
-
constring = ('mssql+pyodbc://' + self.user_name + ':%s@' + self.
|
|
130
|
+
constring = ('mssql+pyodbc://' + self.user_name + ':%s@' + self.server_name + '/' + self.db_name +
|
|
132
131
|
'?driver=' + self.driver + self.trusted_certificate + self.encrypt)
|
|
133
132
|
self.engine = sa.create_engine(constring % parse.quote_plus(self.password))
|
|
134
133
|
if not commit_as_transaction:
|
|
@@ -19,19 +19,19 @@ berryworld/power_automate.py,sha256=V86QEGG9H36DrDvod9Q6yp8OUu307hfYcXJhw06pYrA,
|
|
|
19
19
|
berryworld/sharepoint_con.py,sha256=TuH-Vxk1VxjTi7x80KFssf_J8YPLRXpV27RBaFZi37U,22254
|
|
20
20
|
berryworld/snowflake_conn.py,sha256=go5ZJjnhz5SkG83B0G0XZSwKgU6tg7AFTBso59oRG5M,2434
|
|
21
21
|
berryworld/sql_conn.py,sha256=tYKgD8ja7NQuvLB1WBjdsJbPcm3eX1Y76QPTEgx8R8Q,47564
|
|
22
|
-
berryworld/sql_connenction.py,sha256=
|
|
22
|
+
berryworld/sql_connenction.py,sha256=iFGQHs3QQ7jnLwmhPpnFqI7DFHHE5UuWCfq_QW3SM7U,48349
|
|
23
23
|
berryworld/teams_logging.py,sha256=8NwXyWr4fLj7W6GzAm2nRQCGFDxibQpAHDHHD24FrP8,6997
|
|
24
24
|
berryworld/transportation_solver.py,sha256=tNc1JJk71azIBccdWVHbqcvXWhalOdKffv6HmBD6tG0,5014
|
|
25
25
|
berryworld/verify_keys.py,sha256=X4Nuz3o0XbRDYofbJGvxIDeN5gfWj19PN7lhO6T3hR8,4356
|
|
26
26
|
berryworld/vivantio.py,sha256=QfZo0UKqkzVRg_LyiwivNd3aEup4TH57x4KxLZkCJwc,10627
|
|
27
27
|
berryworld/vivantio_logging.py,sha256=ciy7gA4u3FrgUIpEBnMgocbNPp6jcu9TPoy-kLcrTZU,5736
|
|
28
28
|
berryworld/xml_parser.py,sha256=HWD71NaTN3DaIOGT6Wzxs4CEsroFhGQwe9iPLIL80Co,957
|
|
29
|
-
berryworld-1.0.0.
|
|
29
|
+
berryworld-1.0.0.192758.dist-info/licenses/LICENSE,sha256=vtkVCJM6E2af2gnsi2XxKPr4WY-uIbvzVLXieFND0UU,1074
|
|
30
30
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
31
|
tests/test_allocation_config.py,sha256=e12l6fE9U57eSPS35g6ekJ_hol7-RHg89JV60_m1BlE,4633
|
|
32
32
|
tests/test_handy_mix_config.py,sha256=Un56mz9KJmdn4K4OwzHAHLSRzDU1Xv2nFrONNuzOG04,2594
|
|
33
33
|
tests/test_xml_parser.py,sha256=3QTlhFEd6KbK6nRFKZnc35tad6wqukTbe4QrFi8mr_8,859
|
|
34
|
-
berryworld-1.0.0.
|
|
35
|
-
berryworld-1.0.0.
|
|
36
|
-
berryworld-1.0.0.
|
|
37
|
-
berryworld-1.0.0.
|
|
34
|
+
berryworld-1.0.0.192758.dist-info/METADATA,sha256=CyDlnVUS7BBXo7cx-l3P5RvwPfwd2s98zQRMNTn0RxU,1362
|
|
35
|
+
berryworld-1.0.0.192758.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
36
|
+
berryworld-1.0.0.192758.dist-info/top_level.txt,sha256=GIZ5qy-P5oxfEH755vA1IMFeTVdX3-40JxMe6nOe5I8,17
|
|
37
|
+
berryworld-1.0.0.192758.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|