python-sonarqube-api
Python wrapper for the SonarQube and SonarCloud API.
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-apiuv
uv add python-sonarqube-apipoetry
poetry add python-sonarqube-apiInstalling 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
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
pysonarA command-line scanner that integrates Python…
copyleft · top 15,000 on PyPI
python-gerrit-apiProvides a Python client library for…
permissive · top 15,000 on PyPI
perplexityaiProvides a Python client library for the…
permissive · top 5,000 on PyPI
atlassian-python-apiProvides Python bindings to REST APIs for…
permissive · top 5,000 on PyPI
kanboardA Python client library that wraps the Kanboard…
permissive · top 15,000 on PyPI
swimlaneSwimlane is a Python driver for the Swimlane…
agpl · top 15,000 on PyPI
p4pythonp4python wraps the Perforce C++ API to provide…
unclear · top 15,000 on PyPI
WooCommerceA Python wrapper for the WooCommerce REST API…
permissive · top 15,000 on PyPI
brave-search-python-clientA Python client library for the Brave Search…
permissive · top 15,000 on PyPI
google_apiProvides a Python wrapper for interacting with…
permissive · top 5,000 on PyPI