def get_usernames_like(username,**kwargs):
    """
        Return a list of usernames like the given string.
    """
    checkname = "%%%s%%"%username
    rs = db.DBSession.query(User.username).filter(User.username.like(checkname)).all()
    return [r.username for r in rs]
def get_usernames_like ( username , ** kwargs ) : checkname = "%%%s%%" % username rs = db . DBSession . query ( User . username ) . filter ( User . username . like ( checkname ) ) . all ( ) return [ r . username for r in rs ]
Return a list of usernames like the given string.