Registry / http-networking / ebaysdk

ebaysdk

JSON →
library2.2.0pypypi✓ verified 89d ago

The eBay SDK for Python provides a comprehensive interface for interacting with various eBay APIs, including Trading, Finding, Shopping, and Merchandising. It simplifies API calls and response parsing by converting XML to Python dictionaries. The current version is 2.2.0, with the last release in April 2020, indicating a maintenance-only cadence.

pip install ebaysdk
INSTALL
IMPORT
SIG · EBAYSDK
E
ebaysdk
http-networkingpythonv2.2.0
Install
2.7s avg
Import
758ms
Disk
32MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v2.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.803s · 33.8MB
glibc
py 3.10–3.910 runs
installs and imports cleanly · install 2.7s · import 0.712s · 34MB
32MB installed
● package 32MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Connection (Finding API)
✓ from ebaysdk.finding import Connection as FindingConnection
Connection (Trading API)
✓ from ebaysdk.trading import Connection as TradingConnection
Connection (Shopping API)
✓ from ebaysdk.shopping import Connection as ShoppingConnection
Connection (Merchandising API)
✓ from ebaysdk.merchandising import Connection as MerchandisingConnection
ConnectionError
✓ from ebaysdk.exception import ConnectionError
Recommended for catching API-related exceptions.

This quickstart demonstrates how to search for items using the eBay Finding API. Ensure you have your eBay App ID configured either as an environment variable `EBAY_APPID` or directly replace the placeholder in the `appid` argument. It explicitly bypasses `ebay.yaml` for simplicity and catches potential API connection errors.

import os from ebaysdk.finding import Connection as FindingConnection from ebaysdk.exception import ConnectionError try: api = FindingConnection( domain='svcs.ebay.com', # Use 'svcs.sandbox.ebay.com' for sandbox environment config_file=None, # Explicitly disable config file for this example appid=os.environ.get('EBAY_APPID', 'YOUR_EBAY_APPID') # Replace 'YOUR_EBAY_APPID' with your actual App ID or set EBAY_APPID env var ) # Make a call to find items by keywords response = api.execute('findItemsByKeywords', {'keywords': 'star wars lego'}) if response.reply and response.reply.searchResult and response.reply.searchResult.item: print(f"Found {response.reply.searchResult['@count']} items:") for item in response.reply.searchResult.item[:3]: # print first 3 items print(f"- {item.title} (Current Price: {item.sellingStatus.currentPrice.value} {item.sellingStatus.currentPrice['currencyId']})") else: print("No items found or response malformed.") except ConnectionError as e: print(f"API Connection Error: {e.response.dict()}") except Exception as e: print(f"An unexpected error occurred: {e}")
Debug
Known issues
breakingVersions prior to v1.0.0 (specifically v0.1.11 and older) used PyCurl as the HTTP backend. All versions from v1.0.0 onwards switched to the 'requests' library, requiring code changes for direct HTTP client interactions.
fix
Upgrade to v1.0.0 or later and update any custom HTTP client code to use 'requests' patterns if directly interacting with the client.
affects: <1.0.0
breakingAs of v2.2.0, HTTPS is forced by default for Finding, Shopping, and Trading API calls. Explicitly setting HTTP or not having proper SSL certificate chains might lead to connection errors if you relied on insecure connections.
fix
Ensure your environment supports HTTPS connections and uses valid SSL certificates. If using older versions, manually configure `https=True` in the Connection object.
affects: 2.2.0+
gotchaThe library relies heavily on a `ebay.yaml` configuration file for API credentials and settings. Incorrect path, missing file, or malformed YAML can lead to authentication failures or `FileNotFoundError`.
fix
Place `ebay.yaml` in the expected location (e.g., current working directory or specified path) or explicitly pass credentials (e.g., `appid`, `devid`, `certid`) directly to the `Connection` constructor.
affects: All
gotchaThe library has not been updated since April 2020. Newer eBay API features, changes, or deprecations introduced after this date might not be supported or could lead to unexpected behavior/errors.
fix
Verify that the eBay API functionality you intend to use is compatible with the version of `ebaysdk` (2.2.0). For newer API features, consider alternative solutions or direct API calls if `ebaysdk` does not provide support.
affects: All
Errors
Common errors & fixes
No module named 'ebaysdk'
The `ebaysdk` package has not been installed in your Python environment.
fix
Run `pip install ebaysdk` to install the library.
FileNotFoundError: [Errno 2] No such file or directory: 'ebay.yaml'
The `ebaysdk` library attempts to load an `ebay.yaml` configuration file by default, but it could not be found at the expected path.
fix
Either create an `ebay.yaml` file with your credentials and settings in your working directory, or pass credentials directly to the `Connection` constructor (e.g., `appid='YOUR_APP_ID', config_file=None`).
ebaysdk.exception.ConnectionError: (10007) Invalid request: The request is missing required parameters or is improperly formatted.
This generic error indicates an issue with your API request, often due to missing or incorrect credentials (App ID, Dev ID, Cert ID), an invalid API endpoint, or malformed request parameters.
fix
Double-check your `appid`, `devid`, and `certid` for the correct API. Verify the `domain` parameter (e.g., `svcs.ebay.com` for production, `svcs.sandbox.ebay.com` for sandbox) and the structure of your API call arguments.
Upgrade
Version history
2.2.0latest on PyPI · released Apr 20, 2020
Audit
Dependencies
requestsrequiredHTTP client for making API requests.
PyYAMLoptionalUsed for parsing the `ebay.yaml` configuration file.
Agent activity
34 hits · last 30 days
node
30
OpenAI (training)
1
Resources
ebaysdk — pip install ebaysdk · libregistry