def get_username(uid,**kwargs):
    """
        Return the username of a given user_id
    """
    rs = db.DBSession.query(User.username).filter(User.id==uid).one()

    if rs is None:
        raise ResourceNotFoundError("User with ID %s not found"%uid)

    return rs.username
def get_username ( uid , ** kwargs ) : rs = db . DBSession . query ( User . username ) . filter ( User . id == uid ) . one ( ) if rs is None : raise ResourceNotFoundError ( "User with ID %s not found" % uid ) return rs . username
Return the username of a given user_id