Ejemplo 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')
Ejemplo 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')
Ejemplo 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')
Ejemplo 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')