ecopipeline 1.1.0__py3-none-any.whl → 1.1.1__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.
@@ -222,6 +222,36 @@ class ConfigManager:
222
222
  print(f"Successfully connected to database.")
223
223
  return connection, connection.cursor()
224
224
 
225
+ def connect_siteConfig_db(self) -> (mysql.connector.MySQLConnection, mysql.connector.cursor.MySQLCursor):
226
+ """
227
+ Create a connection with the mySQL server.
228
+
229
+ Parameters
230
+ ----------
231
+ None
232
+
233
+ Returns
234
+ -------
235
+ mysql.connector.MySQLConnection, mysql.connector.cursor.MySQLCursor:
236
+ A connection and cursor object. THe cursor can be used to execute
237
+ mySQL queries and the connection object can be used to save those changes.
238
+ """
239
+
240
+ connection = None
241
+ try:
242
+ connection = mysql.connector.connect(
243
+ host=self.db_connection_info['host'],
244
+ user=self.db_connection_info['user'],
245
+ password=self.db_connection_info['password'],
246
+ database="SiteConfig"
247
+ )
248
+ except mysql.connector.Error:
249
+ print("Unable to connect to database with given credentials.")
250
+ return None, None
251
+
252
+ print(f"Successfully connected to database.")
253
+ return connection, connection.cursor()
254
+
225
255
  def get_fm_token(self) -> str:
226
256
  # for getting feild manager api token
227
257
  if self.api_usr is None or self.api_pw is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecopipeline
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: Contains functions for use in Ecotope Datapipelines
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: GNU General Public License (GPL)
@@ -18,14 +18,15 @@ ecopipeline/event_tracking/alarms/TMSetpoint.py,sha256=C7bhkJrHpJ7ENjGw1Y-r4VIhT
18
18
  ecopipeline/event_tracking/alarms/TempRange.py,sha256=veMQ14Hm-Toom5wsJNe49DwPFS5MZMWp-dMTglUfAb0,5090
19
19
  ecopipeline/event_tracking/alarms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  ecopipeline/extract/__init__.py,sha256=tGMph8ExJG_fYdGnlVbKfGwv8b4t8d7dcH2hekscpeg,822
21
- ecopipeline/extract/extract.py,sha256=OeNwxJ9uWZLJjtpm9_qzVpRRaqyPKjn39WlW4SpzDYE,62062
21
+ ecopipeline/extract/extract.py,sha256=JAWCfyWet1uo5uf8DL-GtWU5ijCWi7AUt4TxNKH4pFs,64653
22
+ ecopipeline/extract/zip_to_lat_long.csv,sha256=rQpdyZxui34nNV-lLhjtbYkYrTz_IZzs9WSm7IjMMPY,2585933
22
23
  ecopipeline/load/__init__.py,sha256=1D1BPhYzfGeHzE5dDtinGi3M7SFr9IfkSulHJKubM58,320
23
24
  ecopipeline/load/load.py,sha256=uQ4nnnui3WmXFGqxI7Me1HPxdLsNybHMbbqkr_oiqHQ,38762
24
25
  ecopipeline/transform/__init__.py,sha256=FjGcNpYNEYPdYQhogNRrQlKH2hGNNLv55jig1KaGaHY,2686
25
26
  ecopipeline/transform/bayview.py,sha256=TP24dnTsUD95X-f6732egPZKjepFLJgDm9ImGr-fppY,17899
26
27
  ecopipeline/transform/lbnl.py,sha256=EQ54G4rJXaZ7pwVusKcdK2KBehSdCsNo2ybphtMGs7o,33400
27
28
  ecopipeline/transform/transform.py,sha256=KVj3kkDa_dQOqRU4l4cHK01L0UPv3FTusQ_Dk2ez8RA,57270
28
- ecopipeline/utils/ConfigManager.py,sha256=E3YzdolFcRMVwxNk359Y0XVShqYquQ9otizPkkk9FU8,13880
29
+ ecopipeline/utils/ConfigManager.py,sha256=GJxUQ9psm_uiU3j0LBsn7h0OFGvxHWS8dAomkaTLR3A,14960
29
30
  ecopipeline/utils/NOAADataDownloader.py,sha256=iC2nl_O4PS1KFrchcPXRZxshwZwUMSqXy6BQBUwnOUU,20927
30
31
  ecopipeline/utils/__init__.py,sha256=7dT3tP6SMK4uBW6NBmQ8i6LaNTTuV6fpAZToBBlJ904,62
31
32
  ecopipeline/utils/unit_convert.py,sha256=VFh1we2Y8KV3u21BeWb-U3TlZJXo83q5vdxxkpgcuME,3064
@@ -34,8 +35,8 @@ ecopipeline/utils/pkls/tasseron_resistance_to_temp_3.pkl,sha256=9UpCZ3rSu0mU4LoT
34
35
  ecopipeline/utils/pkls/tasseron_temp_to_resistance_2.pkl,sha256=Uq6I2dl5GcR5wb5QxurgDP4A2D4-N3neDL3BKtx53A4,2047
35
36
  ecopipeline/utils/pkls/veris_resistance_to_temp_3.pkl,sha256=CVbUWJvOQXg2nZ-0GP9FWtU-ffMGcwg3ok5q669bmf8,1472
36
37
  ecopipeline/utils/pkls/veris_temp_to_resistance_2.pkl,sha256=JiEp4SxR9eq-olKd8TKAG37iHMscJE_2SSHizGqBdno,1472
37
- ecopipeline-1.1.0.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
- ecopipeline-1.1.0.dist-info/METADATA,sha256=igrtMpk3zjLaGqZZnup-AGQK2zyVAta1wufec-YgB-E,2363
39
- ecopipeline-1.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
40
- ecopipeline-1.1.0.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
41
- ecopipeline-1.1.0.dist-info/RECORD,,
38
+ ecopipeline-1.1.1.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
+ ecopipeline-1.1.1.dist-info/METADATA,sha256=k1RWYAYwxdQaTYlD70WJcE6g-6Arqv9JAiziTKzn-Bg,2363
40
+ ecopipeline-1.1.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
41
+ ecopipeline-1.1.1.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
42
+ ecopipeline-1.1.1.dist-info/RECORD,,