api4jenkins
Jenkins Python Client
What it is and what it does
api4jenkins is a Python client library that wraps the Jenkins REST API, letting you programmatically interact with Jenkins from Python code. It offers both sync and async APIs, so you can choose blocking or non-blocking calls depending on your use case. The library models Jenkins concepts (jobs, builds, agents) as Python classes, making it straightforward to query attributes, create jobs from XML, trigger builds, and stream build output.
The package is built on httpx for HTTP transport and supports Python 3.8 through 3.12. It's actively maintained, carries no known vulnerabilities, and is classified as production-stable. The single external dependency keeps installation friction low.
Use it for:
- Automate Jenkins job creation and configuration from Python scripts or CI/CD pipelines.
- Poll Jenkins builds programmatically and stream or parse build logs in real time.
- Write integration tests that spin up Jenkins jobs and verify their output without manual intervention.
- Build dashboards or monitoring tools that query Jenkins job status and build history asynchronously.
- Migrate jobs or build data between Jenkins instances by reading and re-creating them via the API.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python client library for the Jenkins REST API that provides both synchronous and asynchronous interfaces to query, create, and manage Jenkins jobs and builds.
Yes. The package is actively maintained, has no known vulnerabilities, carries a permissive license, and offers low installation friction. It provides a clean, Pythonic interface to Jenkins automation—both sync and async—making it suitable for CI/CD integration, testing, and operational scripting. Install it if you need to automate or integrate with Jenkins from Python.
Install
api4jenkins on PyPI
pip
pip install api4jenkinsuv
uv add api4jenkinspoetry
poetry add api4jenkinsInstalling api4jenkins
Before you install
Low friction: pure Python wheel with a single runtime dependency (httpx). Actively maintained with recent commits and production-stable status.
License in practice
Apache 2.0 permissive license allows commercial and private use with minimal restrictions.
Quickstart
pip install api4jenkins
from api4jenkins import Jenkins
client = Jenkins('http://127.0.0.1:8080/', auth=('admin', 'admin'))
print(client.version)
build = client.build_job('path/to/job')
for line in build.get_build().progressive_output():
print(line)
Requires a running Jenkins instance accessible at the provided URL with valid credentials.
Verify before relying
- Whether httpx is bundled or must be installed separately (likely separate, given it's listed as a runtime dependency).
- Performance characteristics when managing large numbers of jobs or builds concurrently.
Package facts
| License | Apache 2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — httpx |
| Maintenance | actively maintained — 268 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 522,350/month — #6,202 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: api4jenkins-2.1.0-py3-none-any.whl
Keywords: RESTAPI, Jenkins
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
jenkinsapiProvides a Python wrapper around Jenkins' REST…
permissive · top 5,000 on PyPI
python-jenkinsPython wrapper for the Jenkins REST API that…
permissive · top 5,000 on PyPI
wmillwmill is a Python client library for the…
permissive · top 5,000 on PyPI
checkmk-dev-toolsProvides CLI tools for Checkmk developers to…
unclear · top 15,000 on PyPI
py-jama-rest-clientA Python REST API client for Jama Connect that…
permissive · top 15,000 on PyPI
apache-airflow-providers-jenkinsIntegrates Jenkins CI/CD systems into Apache…
permissive · top 15,000 on PyPI
simple-rest-clientA lightweight HTTP client library for building…
unclear · top 15,000 on PyPI
pylint-junitGenerates JUnit-formatted XML reports from…
permissive · top 15,000 on PyPI
prime-sandboxesPython SDK for creating, managing, and…
permissive · top 15,000 on PyPI
python-intercomA Python client library for the Intercom API,…
unclear · top 15,000 on PyPI