The easiest way to install the latest version is by using pip to pull it from PyPI:
pip install --upgrade python-sonarqube-api
You may also use Git to clone the repository from Github and install it manually:
git clone https://github.com/shijl0925/python-sonarqube-api.git cd python-sonarqube-api python setup.py install
The full documentation for API is available on readthedocs.
- This package is compatible Python versions 2.7, 3.3+.
- Tested with SonarQube v7.9.x Community Edition and SonarCloud Server.
The Client is easy to use, you just need to initialize it with the connection parameters (default sonarqube url is http://localhost:9000).
Example:
from sonarqube import SonarQubeClient h = SonarQubeClient(sonarqube_url="http://localhost:9000", user='admin', password='admin')
Sonar authentication tokens can also be used in place of username and password:
h = SonarQubeClient(sonarqube_url="http://localhost:9000", token='*****************')
Example:
from sonarqube import SonarCloudClient h = SonarCloudClient(sonarcloud_url="https://sonarcloud.io", token='*****************')
The API example supported by the SonarQubeClient are: The example documentation for API is available on API examples.