Skip to main content

2024 Python SDK for Jenkins

Project description

Jenkins Python SDK (jenkins_pysdk)

Documentation Status CodeQL PyPI - Downloads

PyPI - Python Version

Installation

Use the package manager pip and JenkinsPythonSDK | pypi.org to install jenkins-pysdk.

pip install jenkins-pysdk

Quick Usage

from jenkins_pysdk.jenkins import Jenkins
jenkins = Jenkins(host="Jenkins.DNS.com", username="<username>", passw="<passw>")

OR

from jenkins_pysdk.jenkins import Jenkins
jenkins = Jenkins(
    host="http://localhost",
    port=8080,
    username="<username>",
    token="<token>",
    proxies={
        "http://": "http://localhost:8080",
        "https://": "http://<username>:<password>@localhost:8080"
    },
    timeout=60,
    verify=False
)

Proxies

For more advanced proxy usage, see HTTPX docs:
https://www.python-httpx.org/advanced/transports/#routing

Why use token= parameter?

Using an API token removes the need for csrf crumbs in your requests. 

The SDK handles crumbs for you, but using token= will reduce the number of API calls. 

See [JenkinsPythonSDK Docs] for full documentation.

Contributing

Feel free to create pull requests.

For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

[!NOTE] I actively support this SDK, but I don't proactively check Jenkins release notes - if the SDK is missing something after an upgrade, please raise it in the discussions section.

[!IMPORTANT] Code is tested on LTS versions:

  • "2.121.3" # (2018)
  • "2.138.4" # (2019)
  • "2.150.3" # (2019)
  • "2.164.3" # (2019)
  • "2.176.4" # (2019)
  • "2.190.3" # (2020)
  • "2.204.6" # (2020)
  • "2.222.4" # (2020)
  • "2.235.5" # (2021)
  • "2.249.3" # (2021)
  • "2.263.4" # (2021)
  • "2.277.4" # (2021)
  • "2.289.3" # (2021)
  • "2.303.3" # (2021)
  • "2.319.1" # (2022)
  • "2.332.3" # (2022)
  • "2.346.3" # (2022)
  • "2.361.4" # (2023)
  • "2.375.3" # (2023)
  • "2.387.1" # (2024)

Author

KnownZero

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

jenkins_pysdk-1.4.4.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jenkins_pysdk-1.4.4-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

Details for the file jenkins_pysdk-1.4.4.tar.gz.

File metadata

  • Download URL: jenkins_pysdk-1.4.4.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for jenkins_pysdk-1.4.4.tar.gz
Algorithm Hash digest
SHA256 da764b0eb435a9e5fe28b0835ec41ef683f1982f80586f43b2d8988a911948b1
MD5 8c588be240488f958a39addcfe2ccedb
BLAKE2b-256 8eba2ce9dc0135a91ee542148d59d164294e3f0cd1bc66d223262b7a5b49645f

See more details on using hashes here.

File details

Details for the file jenkins_pysdk-1.4.4-py3-none-any.whl.

File metadata

  • Download URL: jenkins_pysdk-1.4.4-py3-none-any.whl
  • Upload date:
  • Size: 46.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for jenkins_pysdk-1.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 872eebc490bf88d7432775b805d455ed50f19fade18245aed5fe6a0f0caade61
MD5 fe33e6d2e29437bcbfe1e6d662ce1cd0
BLAKE2b-256 9717aea78f2521448eb958c5a4ce76666e9b86e6e643592353df6141f83c641c

See more details on using hashes here.

Supported by

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