Download shopify_orders.py from mgbam/AICEO: direct link, hf CLI and curl.
- Browser
- Download file 307 Bytes
-
https://huggingface.co/spaces/mgbam/AICEO/resolve/ebce4e75ab00d102c158f50ed8c2d7d894a4ac96/shopify_orders.py
- Command line
-
hf download hf://spaces/mgbam/AICEO@ebce4e75ab00d102c158f50ed8c2d7d894a4ac96/shopify_orders.py
-
curl -L -o shopify_orders.py https://huggingface.co/spaces/mgbam/AICEO/resolve/ebce4e75ab00d102c158f50ed8c2d7d894a4ac96/shopify_orders.py
307 Bytes
| # shopify_orders.py | |
| import shopify | |
| def fetch_recent_orders(limit=5): | |
| orders = shopify.Order.find(limit=limit, status="any") | |
| return [o.to_dict() for o in orders] | |
| if __name__ == "__main__": | |
| recent = fetch_recent_orders() | |
| for o in recent: | |
| print(o["id"], o["email"], o["total_price"]) | |