Skip to main content

add timeout to any function

Project description

ktimeout

python_version PyPI downloads/month

Description

add timeout to any function

Install

pip install ktimeout
# or
pip3 install ktimeout

Usage

import time

from ktimeout import timeout

def random_func():
    while True:
        time.sleep(1)

        print('Sleeping 1 sec')

timeout.run(random_func, 3)

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

ktimeout-0.0.2.tar.gz (1.7 kB view hashes)

Uploaded Source

Built Distribution

ktimeout-0.0.2-py3-none-any.whl (2.9 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