pythonebay-sdk

How to use ebay sdk in Python?


I have found this code sample to make a query in ebay from here and also downloaded ebay-sdk for Python. How can I install the sdk and integrate this code with it?

from ebaysdk import finding, nodeText

f = finding()
f.execute('findItemsAdvanced', {'keywords': 'shoes'})

dom    = f.response_dom()
mydict = f.response_dict()
myobj  = f.response_obj()

print myobj.itemSearchURL

# process the response via DOM
items = dom.getElementsByTagName('item')

for item in items:
    print nodeText(item.getElementsByTagName('title')[0])

Solution

  • It is quite a simple process

    1) Go to http://developer.ebay.com/, register over there, and get the app id key.

    2) You can simply do a 'pip install ebaysdk' to install the ebaysdk

    3) Copy this file in the same directory https://github.com/timotheus/ebaysdk-python/blob/master/ebay.yaml In this file replace appid with what you generated in step 1

    4) Execute the example, this time it will work :)