Metadata-Version: 1.1
Name: useless-py
Version: 1.0.1
Summary: Useful python utilities with less effort.
Home-page: https://github.com/Code-ReaQtor/useless-py
Author: Ronie Martinez
Author-email: ronmarti18@gmail.com
License: MIT
Download-URL: https://github.com/Code-ReaQtor/useless-py/tarball/1.0.1
Description: |version|\ |license|\ |status|
        
        useless-py
        ==========
        
        Useful python utilities with less effort.
        
        Usage
        =====
        
        set\_interval() function
        ------------------------
        
        .. code:: python
        
            from useless import set_interval
        
        
            def my_function():
                print "Hello world!"
        
            set_interval(my_function, 500)  # Caution! Non-blocking.
            time.sleep(10) # Create blocking code
        
        @interval decorator
        -------------------
        
        .. code:: python
        
            from useless import interval
        
        
            @interval(500)
            def my_function():
                print "Hello world!"
        
            my_function()  # Caution! Non-blocking.
            time.sleep(10) # Create blocking code
        
        set\_timeout() function
        -----------------------
        
        .. code:: python
        
            from useless import set_timeout
        
        
            def my_function():
                print "Hello world!"
        
            set_timeout(my_function, 500)
        
        @timeout decorator
        ------------------
        
        .. code:: python
        
            from useless import timeout
        
        
            @timeout(1000)
            def my_function():
                print "Hello world!"
        
            my_function()
        
        set\_time\_limit() function
        ---------------------------
        
        .. code:: python
        
            from useless import set_time_limit, TimeLimitExceededError
            import time
        
        
            def my_function():
                time.sleep(1)
                print "Hello world!"
        
            # if time limit is enough
            set_time_limit(my_function, 1500)
        
            # if time limit is not enough, raises TimeLimitExceededError
            try:
                set_time_limit(my_function, 500)
            except TimeLimitExceededError as e:
                print e.message
        
        @time\_limit decorator
        ----------------------
        
        .. code:: python
        
            from useless import time_limit, TimeLimitExceededError
            import time
        
        
            @time_limit(1500)
            def my_function1():
                time.sleep(1)
                print "Hello world!"
        
        
            @time_limit(500)
            def my_function2():
                time.sleep(1)
                print "Hello world!"
        
            # if time limit is enough
            my_function1()
        
            # if time limit is not enough, raises TimeLimitExceededError
            try:
                my_function2()
            except TimeLimitExceededError as e:
                print e.message
        
        To-Do
        -----
        
        Too many to list here :)
        
        Author
        ------
        
        -  Ronie Martinez (ronmarti18@gmail.com)
        
        .. |version| image:: https://img.shields.io/pypi/v/useless-py.svg
        .. |license| image:: https://img.shields.io/pypi/l/useless-py.svg
        .. |status| image:: https://img.shields.io/pypi/status/useless-py.svg
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Utilities
Requires: gevent
