Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pbelskiy/aiojenkins
Python async client for Jenkins
https://github.com/pbelskiy/aiojenkins
aiohttp asynchronous-python-library asyncio jenkins pypi python
Last synced: 3 days ago
JSON representation
Python async client for Jenkins
- Host: GitHub
- URL: https://github.com/pbelskiy/aiojenkins
- Owner: pbelskiy
- License: mit
- Created: 2020-04-16T20:21:16.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-18T10:50:16.000Z (5 months ago)
- Last Synced: 2025-01-16T02:25:48.753Z (13 days ago)
- Topics: aiohttp, asynchronous-python-library, asyncio, jenkins, pypi, python
- Language: Python
- Homepage: https://aiojenkins.readthedocs.io
- Size: 212 KB
- Stars: 18
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Async python client for `Jenkins `_
=======================================================|Build status|
|Docs status|
|Coverage status|
|Version status|
|Downloads status|.. |Build Status|
image:: https://github.com/pbelskiy/aiojenkins/workflows/Tests/badge.svg
.. |Docs status|
image:: https://readthedocs.org/projects/aiojenkins/badge/?version=latest
.. |Coverage status|
image:: https://img.shields.io/coveralls/github/pbelskiy/aiojenkins?label=Coverage
.. |Version status|
image:: https://img.shields.io/pypi/pyversions/aiojenkins?label=Python
.. |Downloads status|
image:: https://img.shields.io/pypi/dm/aiojenkins?color=1&label=DownloadsAsynchronous 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
------------.. code:: shell
pip3 install aiojenkins
Usage
-----Start new build using `aiojenkins.Jenkins` as an async context manager (preferred):
.. code:: python
import asyncio
import aiojenkinsasync 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:
.. code:: python
import asyncio
import aiojenkinsjenkins = 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())
`Please look at tests directory for more examples. `_
Documentation
-------------`Read the Docs `_
Testing
-------Currently tests aren't using any mocking.
I am testing locally with dockerized LTS Jenkins ver. 2.222.3Prerequisites: `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
toxContributing
------------Feel free to PR