Asynchronous library of Jenkins API based on aiohttp
Project description
Asynchronous python library of Jenkins API endpoints based on aiohttp. Initial version of aiojenkins.
Public API is still unstable.
Also pay attention to brand new library with same API set but with sync and async interfaces. https://github.com/pbelskiy/ujenkins
Status
Installation
pip3 install -U aiojenkins
Documentation
Usage
Start new build:
import asyncio
import aiojenkins
jenkins = aiojenkins.Jenkins('http://your_server/jenkins', 'login', 'password')
async def example():
await jenkins.builds.start('job_name', dict(parameter='test'))
loop = asyncio.get_event_loop()
try:
loop.run_until_complete(example())
finally:
loop.run_until_complete(jenkins.close())
loop.close()
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
Or Jenkins 1.554
docker run -d --name jenkins-1.554 --restart always -p 8081:8080 jenkins:1.554
Contributing
Feel free to PR
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiojenkins-0.7.4.tar.gz.
File metadata
- Download URL: aiojenkins-0.7.4.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61f37535e618088c604b8c642b27151ce09e44e15efd1a1c6061988ef2511bc7
|
|
| MD5 |
2e551a4e2206f89b1895010c5080ea47
|
|
| BLAKE2b-256 |
45ea9e2f37cf91d204f35c0c8e4b3312c01a1a540f490b4180af4a920688b2c5
|
File details
Details for the file aiojenkins-0.7.4-py3-none-any.whl.
File metadata
- Download URL: aiojenkins-0.7.4-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e8937fa15293abda1ee28357f796f283e17e6455ef04933501d9ba52919ffba
|
|
| MD5 |
46b87616cf0323913263589ed2346933
|
|
| BLAKE2b-256 |
c0d1058636ad9281432840be50f58c6d6b23827e6d082bb8aae59bcfc7c39a6a
|