Asynchronous library of Jenkins API endpoints 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)
Minimal Python version is 3.6 due async await and f-strings.
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.build_job('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 Jenkins ver. 2.60.3
Prerequisites: docker, pytest pytest-cov pytest-asyncio
docker run -p 8080:8080 jenkins
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.2.1.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for aiojenkins-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b818cfbee58fcc41f1f76f54518571da87e32efacd52811e383aabac7734df1d |
|
MD5 | ac4fd43e29c1a4e355c2febb90d40456 |
|
BLAKE2b-256 | defa2f5fd51756350fb62999f4f3e98f365c80bfbf98bee8f44f602c057a8140 |