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
Release history Release notifications | RSS feed
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 details)
Built Distribution
File details
Details for the file timeoutcall-1.0rc2.tar.gz
.
File metadata
- Download URL: timeoutcall-1.0rc2.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04796beded7740d0c79aac636c8e30b7384b3135c1169b8b2d5ac4ccea8c9b51 |
|
MD5 | 64d0983f59759b09647ec014f0b526a7 |
|
BLAKE2b-256 | e57d1a435726977a1afc696b8fbb94844b3385da011d515dbff3a5e211cad360 |
File details
Details for the file timeoutcall-1.0rc2-py3-none-any.whl
.
File metadata
- Download URL: timeoutcall-1.0rc2-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb11127e4b5a4d45d2ce16c68e54e243a0f4646f96bc95d0a2f2d64d5a107106 |
|
MD5 | b7cbe2e0b852b2784c8428d2f1b701b6 |
|
BLAKE2b-256 | 4d28206b61966cbb589e870b3e155fdf33cfd4b3d720279a6b6a09a916d93952 |