Skip to main content

It lets call any function with a timeout

Project description

pythonversions License


It lets call any function with a timeout!


pip install timekiller

Link pypi:


Call function

import timekiller
import time

def long_function(foo, bar):
    while True:
        print(foo, bar)

# call(func, max_time, *args, **kwargs), 5, "woo", bar="Uhmm")

def long_function_with_decorator(foo, bar)
    while True:
        print(foo, bar)

long_function_with_decorator("woo", "Uhmm")

Capture exception

import timekiller
import time

def long_function():
    except timekiller.TimeoutException:
        print("capture exception")


TODO: - It works in main thread and processes (not work in threads)


0.0.3 (2016-06-15)

  • Fix
  • Fix pip install version

0.0.2 (2016-06-15)

  • Fix raise exception

0.0.1 (2016-06-14)

  • Initial version

Project details

Download files

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

Files for timekiller, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size timekiller-0.0.3.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page