forked from GoogleCloudPlatform/Open_Data_QnA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcore.py
37 lines (30 loc) · 888 Bytes
/
core.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
Provides the base class for all Connectors
"""
from abc import ABC
class DBConnector(ABC):
"""
The core class for all Connectors
"""
connectorType: str = "Base"
def __init__(self,
project_id:str,
region:str,
instance_name:str,
database_name:str,
database_user:str,
database_password:str,
dataset_name:str):
"""
Args:
project_id (str | None): GCP Project Id.
dataset_name (str):
TODO
"""
self.project_id = project_id
self.region = region
self.instance_name = instance_name
self.database_name = database_name
self.database_user = database_user
self.database_password = database_password
self.dataset_name = dataset_name