jenkinsapi
jenkinsapi is a Python library that wraps Jenkins' REST API into simple Python objects, making it easy to automate Jenkins job management, build execution, and artifact handling. It supports both Hudson and Jenkins servers and includes features for credential management, node configuration, and pipeline control.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | pycontribs/jenkinsapi |
| Owner | pycontribs |
| Primary language | Python |
| License | MIT — OSI-approved |
| Stars | 885 |
| Forks | 492 |
| Open issues | 18 |
| Latest release | 0.3.23 (2026-04-21) |
| Last updated | 2026-06-29 |
| Source | https://github.com/pycontribs/jenkinsapi |
What jenkinsapi is
A Python 3.10+ library that provides object-oriented bindings to Jenkins REST API, enabling programmatic job creation/deletion, build querying, artifact retrieval, and slave/credential management. It uses standard HTTP requests with optional logging and supports both username/password and SSH key authentication.
Get the jenkinsapi source
Clone the repository and explore it locally.
git clone https://github.com/pycontribs/jenkinsapi.gitcd jenkinsapi# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Java runtime required for local development and testing; the project auto-downloads and starts Jenkins during test runs.
- Authentication model limited to username/password and SSH keys; no OAuth2, SAML, or federated identity support documented.
- Latest release is 0.3.23 (April 2026); verify compatibility with your target Jenkins version (project states testing on both LTS and latest).
- Synchronous API design; blocking calls for build completion may require threading/async wrappers for high-concurrency use cases.
- Requires explicit environment variable or function call to enable debug logging; default is silent, which may hinder troubleshooting.
When to avoid it — and what to weigh
- Declarative Infrastructure-as-Code Required — If your team requires declarative, version-controlled infrastructure definitions, consider Jenkins Configuration-as-Code (JCasC) or Terraform Jenkins provider instead of imperative Python scripts.
- Cross-Site Request Forgery (CSRF) Protection Enabled — Documented known issue: job deletion operations fail unless CSRF protection is disabled on the Jenkins server. This may conflict with security policies in regulated environments.
- Non-Python Development Teams — If your engineering team does not use Python or prefers Java/Groovy, Jenkins Groovy scripts or Java plugins may be more maintainable. This library requires Python runtime and familiarity.
- Real-Time Event-Driven Automation — jenkinsapi is polling-based and synchronous. For real-time, event-driven responses to Jenkins state changes, Jenkins webhooks or event streaming solutions are more appropriate.
License & commercial use
Released under MIT License, a permissive open-source license allowing use, modification, and distribution with minimal restrictions.
MIT License permits commercial use without explicit permission requirements. However, verify your Jenkins deployment licensing separately. No warranty is provided; test thoroughly in your environment before production deployment.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
Credentials (username/password, SSH keys) passed in plaintext over network to Jenkins API; ensure TLS/HTTPS is enforced on Jenkins endpoint. The library itself does not validate certificate chains or offer certificate pinning. No audit logging of API calls built-in. CSRF protection incompatibility noted for job deletion; disabling CSRF increases attack surface.
Alternatives to consider
jenkins-python-client / python-jenkins
Similar REST API wrapper; compare feature coverage, API surface, and maintenance status if considering alternatives in the Python ecosystem.
Jenkins Groovy Scripting / Jenkins CLI
Native to Jenkins; avoids external Python dependency and may integrate more seamlessly with Jenkins plugins and security models.
Terraform Jenkins Provider / Jenkins Configuration-as-Code (JCasC)
Declarative, version-controlled, and portable; better suited for infrastructure-as-code and multi-environment management than imperative Python scripts.
Build on jenkinsapi with DEV.co software developers
Evaluate jenkinsapi for your Jenkins automation needs. Start with a small pilot to validate REST API access, credential handling, and CSRF protection settings in your environment.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
jenkinsapi FAQ
Does jenkinsapi work with Jenkins behind a proxy or with HTTPS?
Can I use jenkinsapi with Jenkins security realms (LDAP, Active Directory, OAuth)?
Is there async/await support for non-blocking build monitoring?
What Python versions are supported?
Software development & web development with DEV.co
Need help beyond evaluating jenkinsapi? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source devops integrations — and maintain them long-term.
Ready to Automate Jenkins?
Evaluate jenkinsapi for your Jenkins automation needs. Start with a small pilot to validate REST API access, credential handling, and CSRF protection settings in your environment.