import requests


def get_versions_from_devpi(url):
    """
    Get list of versions for package from devpi server.
    :param url: package url
    :type: str
    :rtype: list
    """
    response = requests.get(url, headers={'Accept': 'application/json'})

    if not response.ok:
        return []

    payload = response.json()
    return payload['result'].keys()