Skip to main content

Python wrapper for the SonarQube and SonarCloud API.

Project description

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.


There are two editions of python-sonarqube-api:

Notice: Professional Edition’s extra features have been remarked by using Only available on the professional edition in API Document.


Community Edition

Professional Edition


GNU AGPLv3 License

MIT License

Commercial Use



Supported APIs (SonarQube Web APIs)


more than 280

Compatibility (SonarQube Versions)

7.9.x - 8.9.x

7.9.x - 10.x

Payment only needs to be made once, and library updates will be provided for free.

Change Log

Community Edition

See the file for Community Edition.

Professional Edition

See the file for Professional Edition.


Community Edition

The easiest way to install the latest version is by using pip to pull it from PyPI:

pip install  --upgrade python-sonarqube-api

Professional Edition

Use command pip to install the Python wheel or source package, Use –force-reinstall to force an installation If necessary:

pip install python_sonarqube_pro_api-x.y.z-py3-none-any.whl


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.


The Client is easy to use, you just need to initialize it with the connection parameters (default sonarqube url is http://localhost:9000).


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='*****************')

API example

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.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-sonarqube-api-2.0.4.tar.gz (30.1 kB view hashes)

Uploaded Source

Built Distribution

python_sonarqube_api-2.0.4-py3-none-any.whl (42.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page