Asynchronous library of Jenkins API based on aiohttp
Project description
aiojenkins
Asynchronous python library of Jenkins API endpoints based on aiohttp 🥳
Initial version of aiojenkins. Public API is still unstable (work is in progress)
Installation
pip install aiojenkins
Usage
Start new build:
import asyncio
import aiojenkins
async def example():
jenkins = aiojenkins.Jenkins('http://your_server/jenkins', 'login', 'password')
await jenkins.builds.start('job_name', dict(parameter='test'))
asyncio.run(example())
Please look at tests directory for more examples.
Testing
Currently tests aren't using any mocking. I am testing locally with dockerized LTS Jenkins ver. 2.222.3
Prerequisites: docker, pytest pytest-cov pytest-asyncio
docker run -d --name jenkins --restart always -p 8080:8080 jenkins/jenkins:lts
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword
python3 -m pytest -v --cov=aiojenkins --cov-report=term --cov-report=html
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
aiojenkins-0.5.2.tar.gz
(9.2 kB
view hashes)
Built Distribution
aiojenkins-0.5.2-py3-none-any.whl
(12.9 kB
view hashes)
Close
Hashes for aiojenkins-0.5.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 390631739abf351e1ee9e5c258655e94a9cec3f15c0dd394b10d363c35afd25a |
|
MD5 | 8f16702b9f03d36c5ec54a752d9c058f |
|
BLAKE2b-256 | 42862ea5c0a514e2b3b4dcacff084b628ec6061cc2b8817c45c94366bb1e7902 |