Esempio n. 1
0
 def __init__(self):
     """The constructor connects to the database"""
     HOST = 'formatread'
     HOST = 'karttur'
     secrets = netrc.netrc()
     username, account, password = secrets.authenticators( HOST )
     pswd = b64encode(password.encode())
     #create a query dictionary for connecting to the Postgres server
     query = {'db':'postgres','user':username,'pswd':pswd}
     #Connect to the Postgres Server
     PGsession.__init__(self,query,'SelectFileFormats')
Esempio n. 2
0
 def __init__(self):
     """The constructor connects to the database"""
     #Connect to the Postgres Server with 'readuser
     #HOST = 'localhost89'
     HOST = 'userread'
     HOST = 'karttur'
     secrets = netrc.netrc()
     dbuser, account, dbuserpswd = secrets.authenticators(HOST)
     dbuserpswd = b64encode(dbuserpswd.encode())
     #create a query dictionary for connecting to the Postgres server
     query = {'db': 'postgres', 'user': dbuser, 'pswd': dbuserpswd}
     PGsession.__init__(self, query, 'SelectUser')
Esempio n. 3
0
 def __init__(self):
     """The constructor connects to the database"""
     #HOST = 'manageancillary'
     HOST = 'karttur'
     secrets = netrc.netrc()
     username, account, password = secrets.authenticators(HOST)
     pswd = b64encode(password.encode())
     #create a query dictionary for connecting to the Postgres server
     query = {'db': 'postgres', 'user': username, 'pswd': pswd}
     #Connect to the Postgres Server
     self.session = PGsession.__init__(self, query, 'ManageAncillary')
Esempio n. 4
0
 def __init__(self):
     """The constructor connects to the database"""
     #HOST = 'localhost99'
     HOST = 'processmanage'
     HOST = 'karttur'
     secrets = netrc.netrc()
     username, account, password = secrets.authenticators(HOST)
     print('    db username', username)
     pswd = b64encode(password.encode())
     #create a query dictionary for connecting to the Postgres server
     query = {'db': 'postgres', 'user': username, 'pswd': pswd}
     #Connect to the Postgres Server
     self.session = PGsession.__init__(self, query, 'SelectProcess')