Skip to main content

A python wrapper for the SonarQube web API

Project description


A class library and CLI to ease interaction with SonarQube API.

Although this project was written from scratch, it was made possible by understanding the previous work of



This script library uses pipenv to set up Python and the required libraries.

Instructions to install pipenv here:


To help development it is useful to run SonarQube as a docker instance.

Use this command:

docker run -d --name sonarqube -p 9000:9000 sonarqube

SonarQube API Docs

SonarQube API docs are not easy to find: They are only available from a running instance of SonarQube.

If you are running sonarqube on localhost try this link:


If you have access to sonarcloud, try this:


import the SonarQube class from the sonarqube.api module:

from sonarqube.api import SonarQube

instantiate the class, and execute any of the supported endpoints:

sq = SonarQube(token=token, host=host, port=port)


sonarqube-py supports the following endpoints:

  • get_authentication_validate
  • get_projects_search
  • get_issues
  • get_rule

All endpoints support parameters as defined in the sonarqube wep-api documentation. I.e. the python client simply passes through any arguments you provide through to the web service API.

Project details

Release history Release notifications

Download files

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

Files for sonarqube-py, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size sonarqube_py-0.1.0-py3-none-any.whl (6.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size sonarqube-py-0.1.0.tar.gz (7.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page