Asynchronous python package of Jenkins API endpoints based on aiohttp.
Also pay attention to brand new package with same API set but with sync and async interfaces:
https://github.com/pbelskiy/ujenkins
Installation
pip3 install aiojenkins
Usage
Start new build using aiojenkins.Jenkins as an async context manager (preferred):
import asyncio
import aiojenkins
async def example():
async with aiojenkins.Jenkins('http://your_server/jenkins', 'user', 'password') as jenkins:
await jenkins.builds.start('job_name', {'parameter': 'test'})
asyncio.run(example())
Or without an async context manager:
import asyncio
import aiojenkins
jenkins = aiojenkins.Jenkins('http://your_server/jenkins', 'user', 'password')
async def example():
try:
await jenkins.builds.start('job_name', {'parameter': 'test'})
finally:
jenkins.close()
asyncio.run(example())
Documentation
Testing
Currently tests aren’t using any mocking. I am testing locally with dockerized LTS Jenkins ver. 2.222.3
Prerequisites: docker, tox
docker run -d --name jenkins --restart always -p 8080:8080 jenkins/jenkins:lts docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword chromium http://localhost:8080 # create admin:admin tox
Contributing
Feel free to PR
Metadata
Release files for aiojenkins 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aiojenkins-0.8.0.tar.gz | 19.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiojenkins-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.3 kB
Release files / aiojenkins-0.8.0.tar.gz
| Download URL | aiojenkins-0.8.0.tar.gz |
|---|---|
| Size | 19.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60212858893a20cfada9e58618094714d67eb3459e9a9bfd0adbdbe12fc254a3
|
|
BLAKE2b-256 checksum How to use checksums |
f7cca7c07c5b9d0af29ffd873106700632eef4a7dee3f3459bfc0fefc7f748ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / aiojenkins-0.8.0-py3-none-any.whl
| Download URL | aiojenkins-0.8.0-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45f33827fd2b0fbb4d2dc30ccec8051ee6565a8e5fb1da71e98420c76fd6e626
|
|
BLAKE2b-256 checksum How to use checksums |
63ea59fdbad5f6e2154c3fe343f910bf9966498dd648ada30f97251ac5ebe6e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|