| .venv_codegen | ||
| ebay_client | ||
| examples | ||
| scripts | ||
| tests | ||
| .gitignore | ||
| .tmp_notification_models.py | ||
| commerce_media_v1_beta_oas3.yaml | ||
| commerce_notification_v1_oas3.yaml | ||
| pyproject.toml | ||
| README.md | ||
| sell_account_v1_oas3.yaml | ||
| sell_feed_v1_oas3.yaml | ||
| sell_fulfillment_v1_oas3.yaml | ||
| sell_inventory_v1_oas3.yaml | ||
eBay REST Client
This workspace contains a Python-first eBay REST client foundation with:
- a shared OAuth 2.0 core
- a shared HTTP transport layer
- public API wrappers per eBay REST domain
- an isolated Pydantic model generation script for each contract in this folder
Currently wired API domains include Notification, Inventory, Fulfillment, Account, Feed, and Media.
Media Helpers
The Media wrapper includes workflow helpers on top of the raw endpoints:
extract_resource_id()to pull a media resource ID from aLocationheaderwait_for_video()to poll until a video reachesLIVEor a terminal failure statewait_for_document()to poll until a document reachesACCEPTEDor a terminal failure statecreate_upload_and_wait_video()to stage, upload, and poll a video in one callcreate_upload_and_wait_document()to stage, upload, and poll a document in one callcreate_document_from_url_and_wait()to create a document from a URL and poll until it is accepted
A concrete workflow example is available in examples/media_workflows.py for:
- uploading an image from a file
- creating an image from a URL
- staging, uploading, and polling a document
- staging, uploading, and polling a video
Generate Low-Level Clients
The project uses a dedicated code generation environment because the main runtime is currently on Python 3.14 while the model generator still targets earlier Python versions.
Run the generator script from the project root:
& .\.venv\Scripts\python.exe .\scripts\generate_clients.py
To generate only one API package:
& .\.venv\Scripts\python.exe .\scripts\generate_clients.py --api notification
This regenerates Pydantic v2 models into ebay_client/generated/<api>/models.py.
Webhook Helpers
The Notification package also includes framework-agnostic webhook utilities for:
- responding to eBay challenge requests
- parsing and validating the
X-EBAY-SIGNATUREheader - verifying signed notification payloads against the cached public key
- turning a verified notification body into a normalized
WebhookEventEnvelope
A concrete FastAPI integration example is available in examples/fastapi_notification_webhook.py.