skillfed

python-sonarqube-api

Python wrapper for the SonarQube and SonarCloud API.

python-sonarqube-api v2.0.5 399.1K downloads/30d#6,952 on PyPI
AGPL license AGPLv3 DORMANT released

What it is and what it does

python-sonarqube-api is a Python wrapper around SonarQube and SonarCloud's REST APIs. It abstracts HTTP request handling and authentication, allowing developers to interact with code quality analysis data via simple Python method calls instead of raw HTTP. The Community Edition (free, AGPLv3) supports approximately 40 API endpoints and is compatible with SonarQube 7.9.x through 8.9.x; a paid Professional Edition offers over 280 endpoints and broader version support.

The library is initialized with a SonarQube URL and either a token or username/password credentials, then used to query project metrics, issues, and other analysis results. It depends only on requests for HTTP communication. The package has been in production-stable status but has not received updates in 740 days, so it is suitable for stable, read-only workflows but may lag behind newer SonarQube features or security patches.

Use it for:

  • Automate retrieval of code quality metrics and issue reports from SonarQube for CI/CD pipelines.
  • Build dashboards or reports that aggregate SonarQube analysis data across multiple projects.
  • Query SonarCloud results programmatically to enforce quality gates in development workflows.
  • Integrate SonarQube findings into custom alerting or notification systems.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Python client library for interacting with SonarQube and SonarCloud REST APIs, wrapping HTTP requests to simplify authentication and API calls.

Yes, if you need a lightweight Python wrapper for SonarQube or SonarCloud APIs and can accept AGPLv3 licensing constraints. The low install friction and stable API make it suitable for read-only workflows. However, the 740-day dormancy means no active maintenance—evaluate whether you need the Professional Edition's broader API coverage or can work within the Community Edition's 40 endpoints, and verify compatibility with your SonarQube version.

Install

python-sonarqube-api on PyPI

pip

pip install python-sonarqube-api

uv

uv add python-sonarqube-api

poetry

poetry add python-sonarqube-api

Installing python-sonarqube-api

Before you install

Low install friction with a single runtime dependency (requests). Maintenance is dormant—no release in 740 days—so expect no active bug fixes or feature updates, though the package is marked as production-stable.

License in practice

Licensed under AGPLv3, which requires derivative works and modifications to be released under the same license and prohibits commercial use without source disclosure. This is a significant constraint for proprietary applications.

Quickstart

pip install python-sonarqube-api

from sonarqube import SonarQubeClient

sonar = SonarQubeClient(sonarqube_url="http://localhost:9000", token='your_token')
# Now call API methods on sonar object

Requires a running SonarQube or SonarCloud instance accessible at the specified URL; authentication token or username/password credentials must be available.

Verify before relying

  • Whether the 40 supported APIs in Community Edition cover your specific SonarQube use cases.
  • Current compatibility with SonarQube versions beyond 8.9.x LTS given the dormant maintenance status.
  • Whether dormancy affects real-world reliability for stable, read-only API interactions.

Package facts

License AGPLv3 (agpl)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — requests
Maintenance dormant — 740 days since the last release
First released
Downloads 399,067/month — #6,952 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_sonarqube_api-2.0.5-py3-none-any.whl

Keywords: api, sonarqube, sonar, client, wrapper, sonarcloud

Development Status :: 5 - Production/StableEnvironment :: PluginsIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Affero General Public License v3Operating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development

Tags

sonarqube api clientsonarcloud python wrappersonarqube rest apicode quality analysis apisonar client library
code-qualityci-cd-integration

More Software Development packages