Small Python scripts for Etsy v3 API automation.
Included:
etsy_oauth.py: local PKCE OAuth flow and token refresh helperetsy_api.py: lightweight Etsy API client with JSON, form, and multipart upload supportetsy_snapshot.py: capture shop/listing snapshots for planningetsy_apply_plan.py: apply listing/section updates from a JSON planetsy_reprice_free_shipping.py: update listing prices for free-shipping experimentspublish_to_etsy.py: create draft listings and upload files/images from a manifest
These scripts use only the Python standard library.
cp .env.example .envFill in:
ETSY_KEYSTRINGETSY_SHARED_SECRETETSY_SHOP_ID
Then authorize:
python3 etsy_oauth.py authorizeEtsy requires an HTTPS redirect URI. The OAuth helper creates a temporary local self-signed cert for https://localhost:3000/oauth/redirect; add that redirect URI in your Etsy developer app settings.
Refresh later:
python3 etsy_oauth.py refreshCapture a local snapshot:
python3 etsy_snapshot.py --spec etsy_growth_plan.json --out-dir data/snapshotsApply a plan with a dry run first:
python3 etsy_apply_plan.py --spec etsy_growth_plan.json --dry-runPublish from a manifest:
python3 publish_to_etsy.py manifest.jsonDo not commit .env, generated local cert/key files, snapshots, receipts, or exported customer/order data. The .gitignore excludes those by default.
If you adapt these scripts from a private shop automation folder, rotate any tokens that were ever committed or shared.