skillfed

jenkinsapi

A Python API for accessing resources on a Jenkins continuous-integration server.

jenkinsapi v0.3.23 896.0K downloads/30d#4,788 on PyPI
Permissive license MIT license Active released

What it is and what it does

Jenkinsapi wraps Jenkins' REST API into Python objects, making it straightforward to automate Jenkins administration and CI/CD tasks from Python scripts. Instead of crafting raw HTTP requests, you work with familiar Python objects representing jobs, builds, nodes, views, and credentials. The library handles authentication, request/response serialization, and common patterns like polling for build completion or searching artifacts.

Typical use cases include scripting job creation and deletion, triggering builds programmatically, querying build results and artifacts, managing Jenkins nodes and credentials, and integrating Jenkins into larger automation workflows. It depends only on pytz and requests, making it lightweight to install. The project is actively maintained, supports modern Python versions (3.10–3.14), and carries no known security vulnerabilities.

Use it for:

  • Automate creation, deletion, and configuration of Jenkins jobs from Python scripts without manual UI interaction.
  • Trigger builds and poll for completion status programmatically, enabling orchestration of multi-stage CI/CD pipelines.
  • Search for and download build artifacts by criteria, then install them to custom directory structures for testing or deployment.
  • Manage Jenkins build nodes, views, and credentials programmatically as part of infrastructure-as-code workflows.
  • Query job and build history by source code revision to correlate CI results with version control events.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Python wrapper around Jenkins' REST API, letting you programmatically manage jobs, builds, nodes, credentials, and artifacts on a Jenkins server.

Yes. Jenkinsapi is actively maintained, carries no known vulnerabilities, has low install friction, and is widely used (top 5000 PyPI packages). It's the standard Python client for Jenkins automation. Install it if you need to script Jenkins administration or integrate Jenkins into Python-based CI/CD workflows.

Install

jenkinsapi on PyPI

pip

pip install jenkinsapi

uv

uv add jenkinsapi

poetry

poetry add jenkinsapi

Installing jenkinsapi

Before you install

Low friction: pure Python wheel with only two runtime dependencies (pytz and requests). Actively maintained with a release within the last 115 days. Supports current Python versions (3.10–3.14).

License in practice

MIT license (permissive) means you can use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions.

Quickstart

pip install jenkinsapi

from jenkinsapi.jenkins import Jenkins

server = Jenkins('http://jenkins-server', username='user', password='token')
job = server.get_job('my-job')
job.disable()

Requires a running Jenkins server accessible at a known URL; authentication credentials (username and API token or password) are needed.

Verify before relying

  • Whether job deletion actually requires disabling Cross-Site scripting protection on all Jenkins versions or only some.
  • Whether the library handles Jenkins plugin compatibility issues beyond the documented NestedViews plugin.
  • Specific port or endpoint configuration required to connect to a Jenkins instance.

Package facts

License MIT license (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — pytz, requests
Maintenance actively maintained — 115 days since the last release
First released
Downloads 896,001/month — #4,788 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: jenkinsapi-0.3.23-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: TestingTopic :: Utilities

Tags

jenkins automation pythonjenkins rest api clientjenkins job managementci/cd pipeline controljenkins build scriptingjenkins server integrationjenkins task automation
ci-cdjenkins-automationrest-api-client

More Utilities packages