Skip to main content

Client library and CLI for sonarqube API

Project description

Python Sonarqube Client

This library provide a programmatic interface to interact with SonarQube. It exposes both a client class and a CLI.

Installation

pip install sonar-client

Example Usage

Using python interface

from sonar_client import SonarClient

sonar_token = "fake-token"
sonar = SonarClient(sonar_token, sonar_url="https://sonarcloud.io")
projects = sonar.search_project(organization="myorg")

Using CLI interface

You can discover available CLI commands by using --help options.

$ sonar-cli --help
Usage: sonar-cli [OPTIONS] COMMAND [ARGS]...

  SonarQube CLI

Options:
  --token TEXT  Sonar access token
  --help        Show this message and exit.

Commands:
  project  Sonar project management
$ sonar-cli project create --help
Usage: sonar-cli project create [OPTIONS]

  Create sonarqube project

Options:
  --org TEXT    Sonar organization  [required]
  --key TEXT    Sonar project key  [required]
  --title TEXT  Sonar project title  [required]
  --help        Show this message and exit.

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

sonar-client-0.0.5.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

sonar_client-0.0.5-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file sonar-client-0.0.5.tar.gz.

File metadata

  • Download URL: sonar-client-0.0.5.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for sonar-client-0.0.5.tar.gz
Algorithm Hash digest
SHA256 dbce52cdc42cd4184694b1f0eb38bb716c2364016d56cd694ce1c8fbe6811532
MD5 04d80ba1790e64130afa5fd6f9c81991
BLAKE2b-256 9bffc1e28a33357b12e212b485ef5e13006951b47d5898d9f62a5d3464fb6afa

See more details on using hashes here.

File details

Details for the file sonar_client-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for sonar_client-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c84160d577e3713b997cfa289cb4a815f57514af23e570345eaf87fbd545f957
MD5 7a66898403d27753458c2af80ebcee14
BLAKE2b-256 1745fa8abe4b88ba39118f62af0b902d89bd2f713b7ef3125a0e5653ff7f713a

See more details on using hashes here.

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