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.
Status
Installation
pip install 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, 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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size aiojenkins-0.6.3-py3-none-any.whl (15.7 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size aiojenkins-0.6.3.tar.gz (11.3 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for aiojenkins-0.6.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f190383dc26765127152c8aed5181645c8718bf27626e1882b5868f5e5aa1777 |
|
MD5 | 07c62e81b4a5f6b40029226e6eddcc7d |
|
BLAKE2-256 | f11ddb48daa400508485eaa073b6f1096f6cd63a1ff59394f26cf5d6c0638c7c |