コード例 #1
0
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)
コード例 #2
0
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)
コード例 #3
0
def test_plotting():
    request = API.query(PRODUCT_ASIN, history=True)
    product = request[0]
    keepa.plot_product(product, show=False)
コード例 #4
0
async def test_plotting(api):
    request = await api.query(PRODUCT_ASIN, history=True)
    product = request[0]
    keepa.plot_product(product, show=False)
コード例 #5
0
ファイル: test_interface.py プロジェクト: akaszynski/keepaAPI
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)
コード例 #6
0
ファイル: test_interface.py プロジェクト: akaszynski/keepaAPI
def test_plotting():
    request = API.query(PRODUCT_ASIN, history=True)
    product = request[0]
    keepa.plot_product(product, show=False)
コード例 #7
0
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'])