berryworld 1.0.0.196834__py3-none-any.whl → 1.0.0.197207__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/__init__.py +2 -3
- berryworld/credentials.py +0 -26
- berryworld/sql_connenction.py +1211 -37
- {berryworld-1.0.0.196834.dist-info → berryworld-1.0.0.197207.dist-info}/METADATA +1 -1
- {berryworld-1.0.0.196834.dist-info → berryworld-1.0.0.197207.dist-info}/RECORD +8 -8
- {berryworld-1.0.0.196834.dist-info → berryworld-1.0.0.197207.dist-info}/WHEEL +0 -0
- {berryworld-1.0.0.196834.dist-info → berryworld-1.0.0.197207.dist-info}/licenses/LICENSE +0 -0
- {berryworld-1.0.0.196834.dist-info → berryworld-1.0.0.197207.dist-info}/top_level.txt +0 -0
berryworld/__init__.py
CHANGED
|
@@ -5,8 +5,7 @@ from .allocation_solver import AllocationSolver
|
|
|
5
5
|
from .pickle_management import PickleManagement
|
|
6
6
|
from .email_logging import EmailLogging
|
|
7
7
|
from .verify_keys import Verify
|
|
8
|
-
from .credentials import SnowflakeCredentials, SQLCredentials,
|
|
9
|
-
MicrosoftTeamsCredentials
|
|
8
|
+
from .credentials import SnowflakeCredentials, SQLCredentials, WebServiceCredentials, MicrosoftTeamsCredentials
|
|
10
9
|
from .persistent_storage import PersistentStorage
|
|
11
10
|
from .generate_env import EnvVariables
|
|
12
11
|
from .sharepoint_con import SharepointConnection, SharepointConn
|
|
@@ -24,4 +23,4 @@ from .teams_logging import TeamsLogging
|
|
|
24
23
|
from .vivantio_logging import VivantioLogging
|
|
25
24
|
from .snowflake_conn import SnowflakeConn
|
|
26
25
|
from .logging import PythonLogs
|
|
27
|
-
from .sql_connenction import SQLConnection
|
|
26
|
+
from .sql_connenction import SQLConnection, SQLConnectionPool, SQLPoolEngine
|
berryworld/credentials.py
CHANGED
|
@@ -71,32 +71,6 @@ class SQLCredentials:
|
|
|
71
71
|
raise ValueError("Variable %s not found" % str(e))
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
class BCCredentials:
|
|
75
|
-
def __init__(self, db_name=None, auth=False):
|
|
76
|
-
self.db_name = db_name
|
|
77
|
-
self.auth = auth
|
|
78
|
-
|
|
79
|
-
def simple_creds(self):
|
|
80
|
-
try:
|
|
81
|
-
if self.auth:
|
|
82
|
-
scope = os.environ.get("BC-AUTH-SCOPE")
|
|
83
|
-
client_id = os.environ.get("BC-AUTH-CLIENT-ID")
|
|
84
|
-
client_secret = os.environ.get("BC-AUTH-CLIENT-SECRET")
|
|
85
|
-
|
|
86
|
-
return {'scope': scope,
|
|
87
|
-
'client_id': client_id,
|
|
88
|
-
'client_secret': client_secret}
|
|
89
|
-
elif self.db_name is not None:
|
|
90
|
-
server_type = os.environ.get(f"BC-ENV-SERVER-{self.db_name.upper()}")
|
|
91
|
-
|
|
92
|
-
return {'server_type': server_type}
|
|
93
|
-
else:
|
|
94
|
-
raise ValueError("Please provide a valid input")
|
|
95
|
-
|
|
96
|
-
except ValueError as e:
|
|
97
|
-
raise ValueError("Variable %s not found" % str(e))
|
|
98
|
-
|
|
99
|
-
|
|
100
74
|
class WebServiceCredentials:
|
|
101
75
|
def __init__(self, service=None):
|
|
102
76
|
self.service = service
|