{"id":20402312,"url":"https://github.com/danlamanna/retryable-requests","last_synced_at":"2025-04-12T14:24:20.138Z","repository":{"id":46020952,"uuid":"401749276","full_name":"danlamanna/retryable-requests","owner":"danlamanna","description":"Easy to use retryable requests sessions.","archived":false,"fork":false,"pushed_at":"2022-08-05T21:10:48.000Z","size":33,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T14:24:17.539Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danlamanna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-31T15:15:22.000Z","updated_at":"2022-03-18T13:52:17.000Z","dependencies_parsed_at":"2022-08-28T09:31:46.713Z","dependency_job_id":null,"html_url":"https://github.com/danlamanna/retryable-requests","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danlamanna%2Fretryable-requests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danlamanna%2Fretryable-requests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danlamanna%2Fretryable-requests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danlamanna%2Fretryable-requests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danlamanna","download_url":"https://codeload.github.com/danlamanna/retryable-requests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248579045,"owners_count":21127749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T04:53:46.998Z","updated_at":"2025-04-12T14:24:20.089Z","avatar_url":"https://github.com/danlamanna.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# retryable-requests\n[![PyPI](https://img.shields.io/pypi/v/retryable-requests)](https://pypi.org/project/retryable-requests/)\n\nEasy to use retryable requests sessions.\n\n## Quickstart\n\n### Common case\n\n``` python\nfrom retryable_requests import RetryableSession\n\nwith RetryableSession() as session:\n    session.get('https://httpbin.org/get')  # will be retried up to 5 times\n```\n\n\n### Only retry on 429 errors\n\n``` python\nfrom requests.packages.urllib3.util.retry import Retry\nfrom retryable_requests import RetryableSession\n\nretry_strategy = Retry(\n    total=5,\n    status_forcelist=[429],\n    backoff_factor=0.1,\n)\n\nwith RetryableSession(retry_strategy=retry_strategy) as session:\n    session.get('https://httpbin.org/get')  # will be retried up to 5 times, only for 429 errors\n```\n\n### Automatically use a base URL for every request\n\n``` python\nfrom retryable_requests import RetryableSession\n\nwith RetryableSession('https://httpbin.org/') as session:\n    session.get('get')  # 'https://httpbin.org/get' will be retried up to 5 times\n    session.post('post')  # 'https://httpbin.org/post' won't be retried (POST request)\n```\n\n## Features\n\n- Automatic backing off retries for failed requests that can be safely retried\n- Quick timeouts for non-responsive requests\n\n## See also\n\n- [urllib3.util.Retry](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html#urllib3.util.Retry)\n- [requests.Session](https://docs.python-requests.org/en/master/user/advanced/#session-objects)\n- [requests_toolbelt.sessions.BaseUrlSession](https://toolbelt.readthedocs.io/en/latest/sessions.html#baseurlsession)\n- [Timeouts in Requests](https://docs.python-requests.org/en/master/user/advanced/#timeouts)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanlamanna%2Fretryable-requests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanlamanna%2Fretryable-requests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanlamanna%2Fretryable-requests/lists"}