Skip to main content

Python wrapper for the SonarQube and SonarCloud API.

Project description

https://img.shields.io/pypi/pyversions/python-sonarqube-api.svg https://img.shields.io/pypi/v/python-sonarqube-api.svg https://pepy.tech/badge/python-sonarqube-api https://static.pepy.tech/badge/python-sonarqube-api/month https://sonarcloud.io/api/project_badges/measure?project=shijl0925_python-sonarqube-api&metric=alert_status https://img.shields.io/github/license/shijl0925/python-sonarqube-api.svg https://img.shields.io/badge/code%20style-black-000000.svg

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.

Editions

There are two editions of python-sonarqube-api:

Differences

Community Edition

Professional Edition

License

GNU AGPLv3 License

MIT License

Commercial Use

No

Yes

Supported APIs (SonarQube Web APIs)

40

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.

Installation

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

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.

Usage

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

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.

Licensing

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.3.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

python_sonarqube_api-2.0.3-py3-none-any.whl (41.8 kB view details)

Uploaded Python 3

File details

Details for the file python-sonarqube-api-2.0.3.tar.gz.

File metadata

  • Download URL: python-sonarqube-api-2.0.3.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.9

File hashes

Hashes for python-sonarqube-api-2.0.3.tar.gz
Algorithm Hash digest
SHA256 63b458db46dc6c47e40233da4b752a10d79edf61274813605cb8c9441ee24e2a
MD5 5d13c681dafef736b648ece8eb87a796
BLAKE2b-256 57d2d078a79968aafb83d3ee88bb888bfe61c44d10aef680fb93cff4bde57d01

See more details on using hashes here.

File details

Details for the file python_sonarqube_api-2.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for python_sonarqube_api-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0851d6fda755dc6cef4eb497c4466c45f17adc6309c20e6f99a75a4c448e6513
MD5 dd4a82305c7f3bb5d2f977ab8c131705
BLAKE2b-256 df63c6d79a6620822b700de1685dc888e6205b7b739fd045ab855a2e44b96d8c

See more details on using hashes here.

Supported by

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