import json
import sys
import urllib2
from distutils.version import LooseVersion
name = sys.argv[1]
resp = urllib2.urlopen("https://pypi.python.org/pypi/{}/json".format(name))
data = json.load(resp)
for ver in sorted([LooseVersion(version) for version in data["releases"].keys()]):
print ver.vstring
Could not find a version that satisfies the requirement
django-filebrowser-no-grappelli==randomwords
(from versions: 3.1.1, 3.5.6, 3.5.7, 3.5.8, 3.6.1, 3.6.2, 3.7.0, 3.7.1, 3.7.2)
No matching distribution found for
django-filebrowser-no-grappelli==randomwords