Interview Prep/Python for DevOps/boto3, HTTP & API errors

`requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://api.github.com/...`

IntermediateTroubleshootingboto3, HTTP & API errors
Answer

Likely causes → You exceeded the rate limit (GitHub: 5,000 requests/hour per token for REST, plus secondary limits on concurrency and content creation).

Diagnose →

print(resp.headers.get("Retry-After"), resp.headers.get("X-RateLimit-Remaining"), resp.headers.get("X-RateLimit-Reset"))

Fix → Honour Retry-After / wait until X-RateLimit-Reset; use Retry(status_forcelist=[429], respect_retry_after_header=True); reduce concurrency; use conditional requests (ETag) and GraphQL to cut call volume; use a GitHub App token for higher limits.

Prevent → Track remaining quota and slow down proactively.

All Python for DevOps questions Roadmap: Python for automation

More on boto3, HTTP & API errors