Skip to main content

Useful python utilities with less effort.

Project description



Useful python utilities with less effort.


pip install useless-py


  • set_interval() function and @interval decorator - similar to Javascript’s setInterval() method, uses gevent
  • set_timeout() function and @timeout decorator - similar to Javascript’s setTimeout() method, uses gevent
  • set_time_limit() function and @time_limit decorator - limits the maximum execution time of a function, raises TimeLimitExceededError
  • @extends decorator - inheritance using a class decorator


Check “sample” folder.


  • [ ] Class Decorators

    • [x] @extends - like Java’s (instead of direct inheritance). IMO, more readable when you are doing multiple inheritance.

    • [ ] @implements - like Java’s (with the help of python “abc” module, we are just adding).

    • [ ] @nocase - rewrite of “nocase” module using a class decorator instead of direct inheritance, more Pythonic, IMO. (

    • [ ] @DidYouMean - raises a “DidYouMean” exception (instead of AttributeError) when an attribute of an instance does not exist and suggests close matches. Think of “git” when you messed up on giving the correct argument:

      C:\Users\Ronie Martinez>git hello
      git: 'hello' is not a git command. See 'git --help'.
      Did you mean one of these?
  • [ ] Context managers

    • [ ] Regular expressions in a “with” statement - I miss the old Perl $1, $2, $3 (special variables)… but global variable is an overkill, let’s make a more Pythonic feature


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 useless-py, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size (5.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page