skillfed

api4jenkins

Jenkins Python Client

api4jenkins v2.1.0 522.4K downloads/30d#6,202 on PyPI93
Permissive license Apache 2.0 Active released

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 api4jenkins

uv

uv add api4jenkins

poetry

poetry add api4jenkins

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Utilities

Tags

jenkins python clientjenkins api wrapperjenkins automationjenkins job managementasync jenkins clientjenkins ci/cd integrationjenkins rest api python
jenkins-automationasync-supportci-cd

More Utilities packages