Requests — HTTP-запросы с повторными попытками
integration
requests is a Claude Code skill that captures best practices for the Python Requests HTTP client, covering sessions, error handling, timeouts, and retry logic. It prescribes `requests.Session()` for connection pooling and persistent headers, and `HTTPAdapter` with `urllib3.util.Retry` for automatic retries on transient errors (429, 500, 502, 503, 504). Required patterns include calling `response.raise_for_status()`, setting explicit `(connect, read)` timeouts — never leaving them at the default infinite wait — and catching `ConnectionError`, `Timeout`, and `HTTPError` explicitly. A dedicated security section forbids `verify=False` in production and mandates environment variables for credentials. Aimed at Python developers integrating third-party APIs who want to avoid hung connections, resource leaks, and insecure token handling.
- #requests
- #http-client
- #api-integration
- #error-handling
- #retries
- #python