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="DNS", 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://",
        "https": "https://"
    },
    timeout=60
)

Why is the token parameter different?

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

Of course, the SDK handles crumbs for you, but it will reduce the number of requests. 

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:

  • "2.121.3" # LTS (2018)
  • "2.138.4" # LTS (2019)
  • "2.150.3" # LTS (2019)
  • "2.164.3" # LTS (2019)
  • "2.176.4" # LTS (2019)
  • "2.190.3" # LTS (2020)
  • "2.204.6" # LTS (2020)
  • "2.222.4" # LTS (2020)
  • "2.235.5" # LTS (2021)
  • "2.249.3" # LTS (2021)
  • "2.263.4" # LTS (2021)
  • "2.277.4" # LTS (2021)
  • "2.289.3" # LTS (2021)
  • "2.303.3" # LTS (2021)
  • "2.319.1" # LTS (2022)
  • "2.332.3" # LTS (2022)
  • "2.346.3" # LTS (2022)
  • "2.361.4" # LTS (2023)
  • "2.375.3" # LTS (2023)
  • "2.387.1" # LTS (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.2.tar.gz (38.4 kB view hashes)

Uploaded Source

Built Distribution

jenkins_pysdk-1.4.2-py3-none-any.whl (47.7 kB view hashes)

Uploaded Python 3

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