gitwtfhub

wtf is python-jenkins?

deepan10/python-jenkins — explained in plain English

Analysis updated 2026-08-15 · repo last pushed 2020-10-18

1PythonAudience · ops devopsComplexity · 3/5DormantSetup · moderate

TL;DR

A Python library that lets you control Jenkins automation servers through code instead of the web interface, automating job creation, builds, and server management tasks.

Mindmap

mindmap
  root((repo))
    What it does
      Control Jenkins via Python
      Create and manage jobs
      Start and check builds
    Management
      Manage build nodes
      Install plugins
      Organize jobs in folders
    Tech stack
      Python
      Jenkins REST API
      OpenStack ecosystem
    Use cases
      Automate new server setup
      Bulk-update jobs
      Gather build info
    Audience
      Jenkins admins
      DevOps teams
      CI automation engineers
    Contributions
      Gerrit not GitHub
      Needs extra plugins

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Automatically set up a new Jenkins server by creating standard jobs, installing plugins, and configuring build nodes in a single Python script.

REASON 2

Bulk-update configurations across many Jenkins jobs without clicking through each one in the web interface.

REASON 3

Write a monitoring script that checks running builds and gathers build status information for reporting.

REASON 4

Schedule recurring maintenance tasks like putting Jenkins into quiet shutdown mode during planned downtime.

What's in the stack?

PythonJenkins REST API

How it stacks up

deepan10/python-jenkins0xallam/posthog0xustaz/streamgate
Stars111
LanguagePythonPythonPython
Last pushed2020-10-182026-03-26
MaintenanceDormantMaintained
Setup difficultymoderatemoderatehard
Complexity3/53/54/5
Audienceops devopspm founderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires access to a running Jenkins server and some advanced features need additional Jenkins plugins installed first.

Open-source license permitting free use, modification, and distribution with the project, as part of the OpenStack ecosystem.

Wtf does this do

python-jenkins lets you control a Jenkins server using Python code instead of manually clicking through Jenkins' web interface. Jenkins is a popular tool that teams use to automate building, testing, and deploying software. If you manage a Jenkins server and find yourself repeatedly doing the same setup tasks by hand, this library turns those tasks into simple lines of code you can run or schedule. At a high level, the library talks to Jenkins through its REST API, essentially sending web requests that tell Jenkins what to do. You can use it to create, copy, delete, or update jobs (the automated tasks Jenkins runs), start builds, check on running builds, manage compute nodes (the machines that actually do the building), install plugins, organize jobs into folders, and even put the whole server into a quiet shutdown mode. It wraps all of these actions into Python functions, so instead of constructing raw HTTP requests, you just call something like "create job" with a name and configuration. This is most useful for teams or individuals who already use Jenkins and want to automate its management. For example, if you spin up a new Jenkins server for every project, you could write a Python script that creates all your standard jobs, installs your usual plugins, and sets up your build nodes in one go. It is also handy for anyone maintaining a large Jenkins setup who wants to bulk-update jobs or gather information about builds without clicking through dozens of screens. The project is part of the OpenStack ecosystem and accepts contributions through Gerrit rather than standard GitHub pull requests. Some advanced features, like folder management and setting the next build number, require additional Jenkins plugins to be installed first.

Yoink these prompts

Prompt 1
Write a Python script using python-jenkins that connects to my Jenkins server, creates a new job called 'nightly-build' with a basic config, and triggers the first build automatically.
Prompt 2
Using python-jenkins, write a script that lists all jobs on my Jenkins server and prints out which ones are currently running builds, so I can monitor build activity from the command line.
Prompt 3
Help me automate Jenkins server setup with python-jenkins: create a script that installs three plugins, creates a folder, and sets up two build nodes from a JSON config file.
Prompt 4
Using python-jenkins, write a script that copies an existing Jenkins job to a new name with an updated configuration XML, so I can quickly spin up similar jobs for different projects.

Frequently asked questions

wtf is python-jenkins?

A Python library that lets you control Jenkins automation servers through code instead of the web interface, automating job creation, builds, and server management tasks.

What language is python-jenkins written in?

Mainly Python. The stack also includes Python, Jenkins REST API.

Is python-jenkins actively maintained?

Dormant — no commits in 2+ years (last push 2020-10-18).

What license does python-jenkins use?

Open-source license permitting free use, modification, and distribution with the project, as part of the OpenStack ecosystem.

How hard is python-jenkins to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is python-jenkins for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.