async def test_empty(api): import matplotlib.pyplot as plt plt.close("all") products = await api.query(["B01I6KT07E", "B01G5BJHVK", "B017LJP1MO"]) with pytest.raises(Exception): keepa.plot_product(products[0], show=False)
def test_empty(): import matplotlib.pyplot as plt plt.close('all') products = API.query(['B01I6KT07E', 'B01G5BJHVK', 'B017LJP1MO']) with pytest.raises(Exception): keepa.plot_product(products[0], show=False)
def test_plotting(): request = API.query(PRODUCT_ASIN, history=True) product = request[0] keepa.plot_product(product, show=False)
async def test_plotting(api): request = await api.query(PRODUCT_ASIN, history=True) product = request[0] keepa.plot_product(product, show=False)
pip install keepa import keepa accesskey = 'bd9k0166uld4djtmu4agpe8g1vs4731jpenjjn4ek84785ir0045lt7q0090l378' # enter real access key here api = keepa.Keepa(accesskey) # Single ASIN query products = api.query('B0088PUEPK') # returns list of product data # Plot result (requires matplotlib) keepa.plot_product(products[0]) products = await api.query('059035342X') # Available keys print(products[0].keys()) # Print ASIN and title print('ASIN is ' + products[0]['asin']) print('Title is ' + products[0]['title'])