def avatar(id): if request.method == 'GET': return Avatar.get(Avatar.id == id).dict() elif request.method == 'PUT': raise NotImplemented('')