docs/examples.rst
Examples
--------
Generic showcase examples
^^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: ../examples/showcase.py
Usage as decorator
^^^^^^^^^^^^^^^^^^
.. literalinclude:: ../examples/decorator.py
Usage as context manager
^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: ../examples/context_manager.py
Timeout retry cycle limit
^^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: ../examples/timeout_limit.py
Retry failed HTTP requests
^^^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: ../examples/http_request.py
Retry failed HTTP requests using asyncio + aiohttp
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: ../examples/http_asyncio.py
Whitelisting custom errors
^^^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: ../examples/whitelisting_errors.py
Blacklisting custom errors
^^^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: ../examples/blacklisting_errors.py
Constant backoff strategy
^^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: ../examples/constant_backoff.py
Fibonacci backoff strategy
^^^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: ../examples/fibonacci_backoff.py
Exponential backoff strategy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: ../examples/exponential_backoff.py