Python Client library for interacting with Community, Developer, and Enterprise Editions SonarQube's REST APIs and SonarCloud's REST APIs.
python-sonarqube-api provides a simple interface for clients to interact with SonarQube via the REST API.
The easiest way to install the latest version is by using pip to pull it from PyPI:
pip install --upgrade python-sonarqube-api
The full documentation for API is available on readthedocs.
- This package is compatible Python versions 2.7, 3.3+.
- Tested with SonarQube Community Edition 8.9.x LTS and SonarCloud Server.
donations are not mandatory but very welcomed If you like my work and want to support development or buy me a coffee PayPal Donate
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 sonar = SonarQubeClient(sonarqube_url="http://localhost:9000", username='admin', password='admin')
Sonar authentication tokens can also be used in place of username and password:
sonar = SonarQubeClient(sonarqube_url="http://localhost:9000", token='*****************')
The example documentation for SonarQubeClient APIs is available on API examples.
See the LICENSE file for licensing information as it pertains to files in this repository.