Python wrapper for the SonarQube and SonarCloud API.
Project description
Python wrapper for the SonarQube(Community Edition and Enterprise Edition) and SonarCloud API.
Installation
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
Documentation
The full documentation for API is available on readthedocs.
Compatibility
This package is compatible Python versions 2.7, 3.3+.
Tested with SonarQube Community Edition 8.9.x LTS and SonarCloud Server.
Donate
donations are not mandatory but very welcomed If you like my work and want to support development or buy me a coffee PayPal Donate
Paypal
Wechat Pay
Alipay
Usage
For SonarQube Community Edition
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", username='admin', password='admin')
Sonar authentication tokens can also be used in place of username and password:
h = SonarQubeClient(sonarqube_url="http://localhost:9000", token='*****************')
For SonarCloud
Example:
from sonarqube import SonarCloudClient h = SonarCloudClient(sonarcloud_url="https://sonarcloud.io", token='*****************')
For SonarQube Enterprise Edition
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 SonarEnterpriseClient h = SonarEnterpriseClient(sonarqube_url="http://localhost:9000", username='admin', password='admin')
Sonar authentication tokens can also be used in place of username and password:
h = SonarEnterpriseClient(sonarqube_url="http://localhost:9000", token='*****************')
API example
The example documentation for SonarQubeClient APIs is available on API examples.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python-sonarqube-api-1.3.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bea1eda64d21c24d7c7650db81bd1deb7dc9f0ebc98b2e12fa2c21eab208e1fa |
|
MD5 | 1f28fd4ef6efe310f8da7146e90ba9a6 |
|
BLAKE2b-256 | 2f9d9ee6a4a8046a32e49cd245fe224d08b4526a3379560efee6d05fc16ec577 |
Hashes for python_sonarqube_api-1.3.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 971196c4f9b2aea66ad09deb4f0370d7057cfc4d2fd40f602f2ea44457cba6b8 |
|
MD5 | 8663bce70ae8c4e806027c5b1ef5f757 |
|
BLAKE2b-256 | 3ea08d13c46a40f66957b0a6b8d15968294d381735351d101332f0324c8fbd5f |