← back to Kravet Sheet Sync 2026 04 20
__pycache__/price_update_pass.cpython-314.pyc
84 lines
+
x
Yju � �B � R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI H
t
Ht ^ RIt^ RI
t
^ RIt]P P! RR4 tRtRR.tRt]P* ! ^4 t]P. ! 4 tR tR
tRR ltRtR
tR tR t] R8X d
]! 4 R# R# )u
Price-update pass for Kravet products whose sheet MAP has changed.
Source: kravet_diff_update_2026_04_20 where change_flag='retail_changed'
Updates: retail price (= sheet MAP) and cost (= MAP/2 + WHLS × Tariff%)
on the main DWKK-XXX variant (the "Sold Per..." variant, NOT Sample).
Pipeline per product:
1) query product variants, find main variant (sku = DWKK-XXX exactly)
2) productVariantsBulkUpdate with new price + new cost
3) write kravet_catalog.price_retail/cost_price
Concurrency: 8 threads.
Resume-safe: tracks updated products in JSONL; re-run skips already-done.
Usage:
python3 price_update_pass.py --limit 100 # pilot
python3 price_update_pass.py # all 4,570
python3 price_update_pass.py --dry-run # no Shopify writes
N)�ThreadPoolExecutor�as_completed�SHOPIFY_ADMIN_TOKEN� zPhttps://designer-laboratory-sandbox.myshopify.com/admin/api/2024-10/graphql.json�sshzroot@45.61.58.125zprice_update_results.jsonlc �� � \ P ! \ R V R2., RRRR7 p\ P ! \
P ! VP 4 4 Uu. uF q"'