Installing axe DevTools Python via pip

Link to Installing axe DevTools Python via pip copied to clipboard

Access and install axe DevTools python through Deque's Agora artifact repository

In order to download axe DevTools, follow the registry access instructions provided by your development operations department, which may be different from this example. This guide shows how to install directly from Deque's Agora Artifactory instance and thus requires authentication information for Agora. This pip.conf example file will guide you through setting up the dependencies to download axe DevTools from Deque's Agora.

Before installing axe DevTools python packages you must configure pip to search Deque's Agora for packages. To do so, you must place a configuration file in certain location.

On Unix and macOS, the configuration file is located at ~/.pip/pip.conf. On Windows, the configuration file is located at ~\pip\pip.ini.

The contents of the configuration file should be as follows:

extra-index-url = https://<USERNAME>:<API_KEY>

Where <USERNAME> and <API_KEY> are replaced with your Agora credentials. The username will be the email address used to log into Agora. Your API key can be retrieved by logging into Agora, clicking the welcome banner in the top right corner, and copying your API key from the profile page. If you do not have Agora login credentials, contact your Deque representative. Also, keep in mind that your username and api key are being inserted into a URL. Special characters need to be URL encoded (e.g. replace an "@" with "%40).

Now you can install axe DevTools python packages. However you install your dependencies, whether listing them inside requirements.txt, within the install_requires of, or via plain pip install you should be able to retrieve the packages.

e.g. to install the axe DevTools API package, use this command:

pip install axe-devtools-api

For your usage, other axe DevTools python packages may be required. For axe DevTools Robot and Behave, you will only need to pip install axe-devtools-robot or pip install axe-devtools-behave. For axe DevTools unittest, you will need to pip install axe-devtools-unittest and pip install axe-devtools-api separately. To use other automated testing frameworks with axe DevTools Python, the API and Selenium packages will be required.

What next

You can test that the package installed properly by opening your python interpreter and doing the following:

$ python
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import axe_devtools_api
>>> print(dir(axe_devtools_api))
['Axe', 'ReportConfiguration', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'axe', 'report_configuration']

Where axe_devtools_api is replaced by whatever package you are installing.

For further documentation, please see one of the package-specific pages.