Metadata-Version: 1.1
Name: timekiller
Version: 0.0.2
Summary: It lets call any function with a timeout
Home-page: https://github.com/GlobalStudioES/timekiller
Author: Alberto Galera Jimenez
Author-email: agalera@globalstudio.es
License: MIT
Description: |pythonversions| |License|
        
        Timekiller
        ==========
        
        It lets call any function with a timeout!
        
        Install
        -------
        
        .. code:: bash
        
            pip install timekiller
        
        Link pypi: https://pypi.python.org/pypi/timekiller
        
        Example
        -------
        
        Call function
        -------------
        
        .. code:: python
        
            import timekiller
            import time
        
        
            def long_function(foo, bar):
                while True:
                    time.sleep(10)
                    print(foo, bar)
        
            # call(func, max_time, *args, **kwargs)
            timekiller.call(long_function, 5, "woo", bar="Uhmm")
        
        
            @timekiller.timeout(5)
            def long_function_with_decorator(foo, bar)
                while True:
                    time.sleep(10)
                    print(foo, bar)
        
            long_function_with_decorator("woo", "Uhmm")
        
        Capture exception
        -----------------
        
        .. code:: python
        
            import timekiller
            import time
        
        
            @timeout(1)
            def long_function():
                try:
                    time.sleep(10)
                except timekiller.TimeoutException:
                    print("capture exception")
        
            long_function()
        
        TODO: - It works in main thread and processes (not work in threads)
        
        .. |pythonversions| image:: https://img.shields.io/pypi/pyversions/timekiller.svg
           :target: https://pypi.python.org/pypi/timekiller
        .. |License| image:: https://img.shields.io/pypi/l/timekiller.svg
           :target: https://opensource.org/licenses/MIT
        
        
        CHANGELOG
        =========
        
        0.0.2 (2016-06-15)
        ------------------
        
        -  Fix raise exception
        
        0.0.1 (2016-06-14)
        ------------------
        
        -  Initial version
        
        
Keywords: timekiller
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
