Module retry (3.5.0) Stay organized with collections Save and categorize content based on your preferences.
- 3.5.0 (latest)
- 3.4.1
- 3.3.1
- 3.2.0
- 3.1.1
- 3.0.0
- 2.19.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.1
- 2.1.0
- 2.0.0
- 1.44.0
- 1.43.0
- 1.42.3
- 1.41.1
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.1
- 1.36.2
- 1.35.1
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.2
- 1.30.0
- 1.29.0
- 1.28.1
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.1
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
Helpers for configuring retries with exponential back-off.
Classes
ConditionalRetryPolicy
ConditionalRetryPolicy(retry_policy,conditional_predicate,required_kwargs)A class for use when an API call is only conditionally safe to retry.
This class is intended for use in inspecting the API call parameters of anAPI call to verify that any flags necessary to make the API call idempotent(such as specifying anif_generation_match or related flag) are present.
It can be used in place of aretry.Retry object, in which case_http.Connection.api_request will pass the requested api call keywordarguments into theconditional_predicate and return theretry_policyif the conditions are met.
| Parameters | |
|---|---|
| Name | Description |
retry_policy | class:A retry object defining timeouts, persistence and which exceptions to retry. |
conditional_predicate | callableA callable that accepts exactly the number of arguments in |
required_kwargs | list(str)A list of keyword argument keys that will be extracted from the API call and passed into the |
Modules Functions
is_etag_in_data
is_etag_in_data(data)Return True if an etag is contained in the request body.
| Parameter | |
|---|---|
| Name | Description |
data | dict or NoneA dict representing the request JSON body. If not passed, returns False. |
is_etag_in_json
is_etag_in_json(data)is_etag_in_json is supported for backwards-compatibility reasons only;please useis_etag_in_data instead.
is_generation_specified
is_generation_specified(query_params)Return True if generation or if_generation_match is specified.
is_metageneration_specified
is_metageneration_specified(query_params)Return True if if_metageneration_match is specified.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-05 UTC.