import requests
from pkg_resources import parse_version

def versions(name):
    url = 'https://pypi.python.org/pypi/{}/json'.format(name)
return sorted(requests.get(url).json()['releases'], key=parse_version)
pypi see older versions of package