Skip to main content

refry

You know what's better than fries? Fries cooked twice. And what's even better than twice cooked fries is triple cooked fries!

Refry is a modern, maintained, typed easy-to-use retry decorator.

Installation

pip install refry

Usage

Basic usage

import refry

@refry.retry
def function_with_problem():
    raise Exception('Something bad happens here')


# This will be attempted 5 times, each time with a delay increasing
# by 5 seconds.
function_with_problem()

With custom exception:

@refry.retry(ZeroDivisionError)
def function_with_bad_division():
    1 / 0


function_with_bad_division()

Release files for refry 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for refry 0.1.0
File Size Uploaded
refry-0.1.0.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for refry 0.1.0
File Interpreter ABI Platform
refry-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.6 kB

Release files / refry-0.1.0.tar.gz

Download URL refry-0.1.0.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
96819cd7d625b38fb12fd11f7186604522b3530f24abc1210deb93c9ae641404
BLAKE2b-256 checksum
How to use checksums
6b5d57ee044dc120e4a43670d5c0297572482043c6ec8f7aacc2d23b4414ae9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.3

Release files / refry-0.1.0-py3-none-any.whl

Download URL refry-0.1.0-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dca5165686ea95ef262b3634c0ba6921de2ad1cd2fe3ece09e6046d2ea8c175f
BLAKE2b-256 checksum
How to use checksums
6fd37f7a9fec506be88f801611c8d09b7198c1a04413472265d1c73865657c6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page