def all_versions ( req ) : import requests url = "https://pypi.python.org/pypi/" + req + "/json" return tuple ( requests . get ( url ) . json ( ) [ "releases" ] . keys ( ) )
how to see all python versions
Get all versions of req from PyPI .
def all_versions(req):
    """Get all versions of req from PyPI."""
    import requests
    url = "https://pypi.python.org/pypi/" + req + "/json"
    return tuple(requests.get(url).json()["releases"].keys())