aiojenkins


Nameaiojenkins JSON
Version 0.8.0 PyPI version JSON
download
home_pagehttps://github.com/pbelskiy/aiojenkins
SummaryAsynchronous library of Jenkins API based on aiohttp
upload_time2024-08-18 11:02:18
maintainerNone
docs_urlNone
authorPetr Belskiy
requires_python>=3.8
licenseMIT
keywords aiojenkins async jenkins api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Async python client for `Jenkins <https://jenkins.io>`_
=======================================================

|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=Downloads


Asynchronous 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 aiojenkins

    async 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 aiojenkins

    jenkins = 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. <https://github.com/pbelskiy/aiojenkins/tree/master/tests>`_

Documentation
-------------

`Read the Docs <https://aiojenkins.readthedocs.io/en/latest/>`_

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

Contributing
------------

Feel free to PR

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pbelskiy/aiojenkins",
    "name": "aiojenkins",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "aiojenkins, async jenkins api",
    "author": "Petr Belskiy",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/f7/cc/a7c07c5b9d0af29ffd873106700632eef4a7dee3f3459bfc0fefc7f748ce/aiojenkins-0.8.0.tar.gz",
    "platform": null,
    "description": "Async python client for `Jenkins <https://jenkins.io>`_\n=======================================================\n\n|Build status|\n|Docs status|\n|Coverage status|\n|Version status|\n|Downloads status|\n\n.. |Build Status|\n   image:: https://github.com/pbelskiy/aiojenkins/workflows/Tests/badge.svg\n.. |Docs status|\n   image:: https://readthedocs.org/projects/aiojenkins/badge/?version=latest\n.. |Coverage status|\n   image:: https://img.shields.io/coveralls/github/pbelskiy/aiojenkins?label=Coverage\n.. |Version status|\n   image:: https://img.shields.io/pypi/pyversions/aiojenkins?label=Python\n.. |Downloads status|\n   image:: https://img.shields.io/pypi/dm/aiojenkins?color=1&label=Downloads\n\n\nAsynchronous python package of Jenkins API endpoints based on aiohttp.\n\n----\n\nAlso pay attention to brand new package with same API set but with sync and async interfaces:\n\nhttps://github.com/pbelskiy/ujenkins\n\nInstallation\n------------\n\n.. code:: shell\n\n    pip3 install aiojenkins\n\nUsage\n-----\n\nStart new build using `aiojenkins.Jenkins` as an async context manager (preferred):\n\n.. code:: python\n\n    import asyncio\n    import aiojenkins\n\n    async def example():\n        async with aiojenkins.Jenkins('http://your_server/jenkins', 'user', 'password') as jenkins:\n            await jenkins.builds.start('job_name', {'parameter': 'test'})\n\n    asyncio.run(example())\n\nOr without an async context manager:\n\n.. code:: python\n\n    import asyncio\n    import aiojenkins\n\n    jenkins = aiojenkins.Jenkins('http://your_server/jenkins', 'user', 'password')\n\n    async def example():\n        try:\n            await jenkins.builds.start('job_name', {'parameter': 'test'})\n        finally:\n            jenkins.close()\n\n    asyncio.run(example())\n\n`Please look at tests directory for more examples. <https://github.com/pbelskiy/aiojenkins/tree/master/tests>`_\n\nDocumentation\n-------------\n\n`Read the Docs <https://aiojenkins.readthedocs.io/en/latest/>`_\n\nTesting\n-------\n\nCurrently tests aren't using any mocking.\nI am testing locally with dockerized LTS Jenkins ver. 2.222.3\n\nPrerequisites: `docker, tox`\n\n::\n\n    docker run -d --name jenkins --restart always -p 8080:8080 jenkins/jenkins:lts\n    docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword\n    chromium http://localhost:8080  # create admin:admin\n    tox\n\nContributing\n------------\n\nFeel free to PR\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Asynchronous library of Jenkins API based on aiohttp",
    "version": "0.8.0",
    "project_urls": {
        "Download": "https://pypi.org/project/aiojenkins",
        "Homepage": "https://github.com/pbelskiy/aiojenkins"
    },
    "split_keywords": [
        "aiojenkins",
        " async jenkins api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "63ea59fdbad5f6e2154c3fe343f910bf9966498dd648ada30f97251ac5ebe6e1",
                "md5": "0fccf341f56ecbbd254f70e97d6c537b",
                "sha256": "45f33827fd2b0fbb4d2dc30ccec8051ee6565a8e5fb1da71e98420c76fd6e626"
            },
            "downloads": -1,
            "filename": "aiojenkins-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0fccf341f56ecbbd254f70e97d6c537b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 16125,
            "upload_time": "2024-08-18T11:02:17",
            "upload_time_iso_8601": "2024-08-18T11:02:17.312111Z",
            "url": "https://files.pythonhosted.org/packages/63/ea/59fdbad5f6e2154c3fe343f910bf9966498dd648ada30f97251ac5ebe6e1/aiojenkins-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7cca7c07c5b9d0af29ffd873106700632eef4a7dee3f3459bfc0fefc7f748ce",
                "md5": "5480d14cf5eb2b99f029e19cb311b5ac",
                "sha256": "60212858893a20cfada9e58618094714d67eb3459e9a9bfd0adbdbe12fc254a3"
            },
            "downloads": -1,
            "filename": "aiojenkins-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5480d14cf5eb2b99f029e19cb311b5ac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 19165,
            "upload_time": "2024-08-18T11:02:18",
            "upload_time_iso_8601": "2024-08-18T11:02:18.736307Z",
            "url": "https://files.pythonhosted.org/packages/f7/cc/a7c07c5b9d0af29ffd873106700632eef4a7dee3f3459bfc0fefc7f748ce/aiojenkins-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-18 11:02:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pbelskiy",
    "github_project": "aiojenkins",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "aiojenkins"
}
        
Elapsed time: 0.66666s