pyjenkins

Python wrapper around the Jenkins JSON API


Keywords
jenkins
License
MIT
Install
pip install pyjenkins==0.1.2

Documentation

Develop:

Build Status

Master (release branch):

Build Status

PyJenkins

Python wrapper around the Jenkins JSON API

Features

Query Jenkins jobs and builds, and trigger a build.

Installation

pip install pyjenkins

Usage

>>> from pyjenkins import Jenkins
>>> jenkins = Jenkins("http://jenkins.example.com/", 'username', 'password')
>>> job = jenkins.get_job_by_name('my-job')
>>> build = job.build('auth-token')
>>> build.started
False
...
>>> build.refresh()
>>> build.started
True
>>> build.complete
False
>>> build.estimated_duration
60234
...
>>> build.complete
True
>>> build.successful
True