Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python wrapper for the Jenkins CI REST API

Project Description

Overview

Extensible, user and developer friendly Python interface to the Jenkins CI tool, wrapping the features exposed by the standard REST API using Pythonic objects and functions. Tested against the latest 2.x and 3.x versions of Python, and the latest trunk and LTS editions of Jenkins.

With an intuitive and well thought out interface, PyJen offers anyone familiar with the Python programming language an easy way to manage Jenkins dashboards from a simple command prompt. All core primitives of Jenkins, including views, jobs and builds are easily accessible and can be loaded, analyzed and even modified or created via simple Python commands.

Comments, suggestions and bugs may be reported to the project maintainer

Full API documentation can be found on ReadTheDocs.org.

Quick start guide

  1. First, we recommend that you install the pip package manager as described here
  2. Install PyJen directly from PyPI using PIP:
# pip install pyjen --pre
  1. import the pyjen module and start scripting! See below for some common examples.

For a more in-depth guide to contributing to the project, see our contributors guide.

Examples

Display a list of all jobs on the default view

from pyjen.jenkins import Jenkins
jk = Jenkins("http://localhost:8080")
vw = jk.default_view
jobs = vw.jobs

for j in jobs:
    print(j.name)

Disable all jobs in a view named “My View”

from pyjen.jenkins import Jenkins
jk = Jenkins("http://localhost:8080")
vw = jk.find_view("My View")
vw.disable_all_jobs()

Get all upstream dependencies of a job named “JobA”

from pyjen.jenkins import Jenkins
jen = Jenkins("http://localhost:8080")
jb = jen.find_job("JobA")
upstream = jb.all_upstream_jobs

for u in upstream:
    print(u.name)

Clone all jobs in a view who are named with a ‘trunk’ identifier for a new branch configuration

from pyjen.jenkins import Jenkins
j = Jenkins("http://localhost:8080")
v = j.find_view("trunk_builds")
v.clone_all_jobs("trunk", "branch")
Release History

Release History

This version
History Node

0.0.122.dev0

History Node

0.0.121.dev0

History Node

0.0.119.dev0

History Node

0.0.118.dev0

History Node

0.0.110.dev0

History Node

0.0.109.dev0

History Node

0.0.11.dev0

History Node

0.0.10dev

History Node

0.0.9dev

History Node

0.0.8dev

History Node

0.0.7dev

History Node

0.0.6dev

History Node

0.0.5dev

History Node

0.0.4dev

History Node

0.0.3dev

History Node

0.0.2dev

History Node

0.0.1dev

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyjen-0.0.122.dev0-py2.py3-none-any.whl (54.3 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jun 14, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting