Skip to main content

Run code asynchronously to the main code execution

pip install interval-repeat-decorator



from interval_repeat_decorator import repeat_action

from threading import Lock

lock = Lock()

@repeat_action(

    print_exception=True,

    exception_value="FTW",

    break_on_exceptions=False,

    interval=.1,

    threadlock=lock,

    kill_thread="ctrl+x",

    number_of_executions=10,

)

def testest(number):

    if number == 0:

        print(number)

        return True

    elif number == 1:

        print(number / 0)

    return True

@repeat_action(

    print_exception=True,

    exception_value="FTW",

    break_on_exceptions=False,

    interval=.2,

    threadlock=lock,

    kill_thread="ctrl+y",

    number_of_executions=5,

)

def testest2(number):

    if number == 0:

        print(number)

        return True

    elif number == 1:

        print(number / 0)

    return True

testex = testest(number=0)

testex2 = testest2(number=1)

print(f"{testex=}\n{testex2=}") #returns the first result only, but will keep on executing!  

0

division by zero

testex=True

testex2='FTW'

0

division by zero

0

0

division by zero

0

0

division by zero

0

0

division by zero

0

0

testex

Out[3]: True

testex2

Out[4]: 'FTW'

Metadata

Release files for interval-repeat-decorator 0.10

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

Source distribution (sdist)

Source distribution for interval-repeat-decorator 0.10
File Size Uploaded Provenance Actions
interval_repeat_decorator-0.10.tar.gz 3.9 kB Without provenance Details for interval_repeat_decorator-0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for interval-repeat-decorator 0.10
File Interpreter ABI Platform Actions
interval_repeat_decorator-0.10-py3-none-any.whl Python 3 none any Details for interval_repeat_decorator-0.10-py3-none-any.whl

Total release size: 9.5 kB

Release files / interval_repeat_decorator-0.10.tar.gz

Download URL interval_repeat_decorator-0.10.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e188d51b3bb269f9d21f9e4d044302ea44c0a6060be40494118514bcebc2f037
BLAKE2b-256 checksum
How to use checksums
8ba41c19e7e04100101d2ef6c04d93d948523fbc796747d649ea396d25081228
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / interval_repeat_decorator-0.10-py3-none-any.whl

Download URL interval_repeat_decorator-0.10-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8607659af8ef1e92f4f1094aa24d449b47de3dcfe33bf32a16c11feb7a4691f
BLAKE2b-256 checksum
How to use checksums
15ac3db5025ca204946591e2a1c61aad675bbb4ea1e3040ae445ac4dd1f2c6be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for interval-repeat-decorator 0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files No provenance

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