Skip to main content

Universal (sync/async) Python client for Jenkins

Project description

Python client for jenkins which supports both synс and async syntax with same API interfaces.

Status

Build status Docs status Coverage status Version status Downloads status

Documentation

Read the Docs

Installation

pip3 install -U ujenkins

Comparison to other libraries

Name

sync

async

ujenkins

YES

YES

aiojenkins

NO

YES

python-jenkins

YES

NO

jenkinsapi

YES

NO

Usage

Main advantage of this library is that same API interfaces used for sync and async syntax.

Get Jenkins version using sync client:

from ujenkins import JenkinsClient

def example():
    client = JenkinsClient('http://server', 'login', 'password')
    version = client.system.get_version()
    print(version)

example()

With async client:

import asyncio
from ujenkins import AsyncJenkinsClient

async def example():
    client = AsyncJenkinsClient('http://server', 'login', 'password')
    version = await client.system.get_version()
    print(version)

asyncio.run(example())

Please look at tests directory for more examples.

Testing

Prerequisites: tox

Then just run tox, all dependencies and checks will run automatically

tox

Contributing

Any contributions are welcome!

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

ujenkins-0.2.0.tar.gz (13.2 kB view hashes)

Uploaded Source

Built Distribution

ujenkins-0.2.0-py3-none-any.whl (17.3 kB view hashes)

Uploaded Python 3

Supported by

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