429 on bulk user PATCH - backoff logic failing?

Slamming PATCH /api/v2/users/{id} in a loop for 500 agents and hitting 429s instantly. Tried a simple 1s sleep but the queue just piles up. Is there a standard retry header I’m missing or do I need to parse the Retry-After value from the 429 response? My current script just crashes after 50 errors. Here’s the loop:

for user in users:
 resp = requests.patch(url, json=data)
 if resp.status_code == 429:
 time.sleep(1)
 resp.raise_for_status()

What’s the right way to handle the backoff without manual sleeps?