@classmethod
    def select_one(cls, where, *args):
        '''
        Find by where clause and return one result. If multiple results found, 
        only the first one returned. If no result found, return None.
        '''
        d = select_one('select * from %s %s' % (cls.__table__, where), *args) if where else \
            select_one('select * from %s' % cls.__table__)
        return cls(**d) if d else None
dataset/ETHPy150Open michaelliao/transwarp/transwarp/db.py/Model.select_one/original