Use select method instead of query
Change docstring :rtype: info to list
Import __future__ for compatibility
Add ‘method’ parameter
Sort list on return
Extract query and host to global constants