def get_one(self, qry, tpl):
        ''' get a single from from a query
        limit 1 is automatically added '''
        self.cur.execute(qry + ' LIMIT 1', tpl)
        result = self.cur.fetchone()
        # unpack tuple if it has only
        # one element
        # TODO unpack results
        if type(result) is tuple and len(result) == 1:
            result = result[0]
        return result
get a single from from a query
        limit 1 is automatically added