def setup_api(): api = Api(app) api.add_resource(ReadViaImage, ROOT_PATH + '/image') api.add_resource(ReadViaUrl, ROOT_PATH + '/url')