Skip to main content

A package designed to kill a function after a specified amount of time.

Project description

timeoutcall

A package designed to kill a function after a specified amount of time.

Usage

Killing a function after a specified amount of time:

from timeoutcall import timeout
from time import sleep

@timeout(2, "error: took too long")
def foo():
    sleep(3) # will raise TimeoutError

foo()

Running a test/preview:

$ python3 -m timeoutcall.test

Developers

Build and Source Distributions

To build the wheel and source distributions, cd into the repositories root directory and run the following command:

python3 -m build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timeoutcall-1.0rc2.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

timeoutcall-1.0rc2-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page