Skip to content
matecsaj edited this page Jun 13, 2020 · 5 revisions

Configure your ebaysdk with the YAML file. Values defined in the YAML file will get picked up by the SDK. These values do not override any values set in the code when instantiating the object.

Sample YAML

name: ebay_api_config

# Trading API Sandbox - https://www.x.com/developers/ebay/products/trading-api
api.sandbox.ebay.com:
    compatibility: 719
    appid: ENTER_YOUR_APPID_HERE
    certid: ENTER_YOUR_CERTID_HERE
    devid: ENTER_YOUR_DEVID_HERE
    token: ENTER_YOUR_TOKEN_HERE

# Trading API - https://www.x.com/developers/ebay/products/trading-api
api.ebay.com:
    compatibility: 719
    appid: ENTER_YOUR_APPID_HERE
    certid: ENTER_YOUR_CERTID_HERE
    devid: ENTER_YOUR_DEVID_HERE
    token: ENTER_YOUR_TOKEN_HERE

# Finding API - https://www.x.com/developers/ebay/products/finding-api
svcs.ebay.com:
    appid: ENTER_YOUR_APPID_HERE
    version: 1.0.0

# Shopping API - https://www.x.com/developers/ebay/products/shopping-api
open.api.ebay.com:
    appid: ENTER_YOUR_APPID_HERE
    version: 671

Usage

By default, the SDK will look for a file named "ebay.yaml" in the current, home, and /etc directories; and in this order. The name of this file can be changed; it just needs to be passed along to the constructor.

ebaysdk.finding.Connection(config_file='myebay.yaml')

Usage - using the SDK without YAML configuration

ebaysdk.finding.Connection(appid="...", config_file=None)

Which value takes precedence?

Values defined when instantiating the object will override any of the YAML defaults.

ebaysdk.finding.Connection(appid='MYAPPID', compatibility='987')