Skip to main content

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

Build Status Docs status Coverage status Version status Downloads status

Installation

pip3 install -U aiojenkins

Documentation

Read the Docs

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()

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, 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


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.7.4.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

aiojenkins-0.7.4-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

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

Hashes for aiojenkins-0.7.4.tar.gz
Algorithm Hash digest
SHA256 61f37535e618088c604b8c642b27151ce09e44e15efd1a1c6061988ef2511bc7
MD5 2e551a4e2206f89b1895010c5080ea47
BLAKE2b-256 45ea9e2f37cf91d204f35c0c8e4b3312c01a1a540f490b4180af4a920688b2c5

See more details on using hashes here.

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

Hashes for aiojenkins-0.7.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0e8937fa15293abda1ee28357f796f283e17e6455ef04933501d9ba52919ffba
MD5 46b87616cf0323913263589ed2346933
BLAKE2b-256 c0d1058636ad9281432840be50f58c6d6b23827e6d082bb8aae59bcfc7c39a6a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page