"""Model for the ows-product microservice.""" from owsrequest import request from owsresponse import response OWS_PRODUCT = 'ows-product' def get_product_for_upc(upc): """Get a product from ows-product by its upc. Args: upc (string): the UPC of the product to return. Returns: response.Response: the product data. """ model = request.get(OWS_PRODUCT, '/product/upc/{}'.format(upc)) return response.Response(message=model.json(), status=model.status_code)