jenkinsapi


Namejenkinsapi JSON
Version 0.3.14 PyPI version JSON
download
home_pageNone
SummaryA Python API for accessing resources on a Jenkins continuous-integration server.
upload_time2025-03-18 10:36:29
maintainerNone
docs_urlhttps://pythonhosted.org/jenkinsapi/
authorNone
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Jenkinsapi
==========

.. image:: https://badge.fury.io/py/jenkinsapi.png
    :target: http://badge.fury.io/py/jenkinsapi

.. image:: https://codecov.io/gh/pycontribs/jenkinsapi/branch/master/graph/badge.svg
        :target: https://codecov.io/gh/pycontribs/jenkinsapi

About this library
-------------------

Jenkins is the market leading continuous integration system, originally created by Kohsuke Kawaguchi.

Jenkins (and its predecessor Hudson) are useful projects for automating common development tasks (e.g. unit-testing, production batches) - but they are somewhat Java-centric.
| Jenkinsapi makes scripting Jenkins tasks a breeze by wrapping the REST api into familiar python objects.
| Here is a list of some of the most commonly used functionality

* Add, remove, and query Jenkins jobs
* Control pipeline execution
    * Query the results of a completed build
    * Block until jobs are complete or run jobs asyncronously
    * Get objects representing the latest builds of a job
* Artifact management
    * Search for artifacts by simple criteria
    * Install artifacts to custom-specified directory structures
* Search for builds by source code revision
* Create, destroy, and monitor
    * Build nodes (Webstart and SSH slaves)
    * Views (including nested views using NestedViews Jenkins plugin)
    * Credentials (username/password and ssh key)
* Authentication support for username and password
* Manage jenkins and plugin installation

Full library capabilities are outlined in the `Documentation <http://pycontribs.github.io/jenkinsapi/>`__


Known issues
------------
* Job deletion operations fail unless Cross-Site scripting protection is disabled.

For other issues, please refer to the `support URL <https://github.com/pycontribs/jenkinsapi/issues?direction=desc&sort=comments&state=open>`_

Important Links
---------------
* `Support and bug-reports <https://github.com/pycontribs/jenkinsapi/issues?direction=desc&sort=comments&state=open>`_
* `Source Code <https://github.com/pycontribs/jenkinsapi>`_
* `Documentation <http://pycontribs.github.io/jenkinsapi/>`__
* `Releases <http://pypi.python.org/pypi/jenkinsapi>`_

Installation
-------------

Egg-files for this project are hosted on PyPi. Most Python users should be able to use pip or setuptools to automatically install this project.

Using Pip or Setuptools
^^^^^^^^^^^^^^^^^^^^^^^

Most users can do the following:

.. code-block:: bash

	pip install jenkinsapi

Using your operating-system's package manager
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Ubuntu users can now use apt to install this package:

.. code-block:: bash

    apt-get install python-jenkinsapi

Beware that this technique will get a somewhat older version of Jenkinsapi.

Example
-------

JenkinsAPI is intended to map the objects in Jenkins (e.g. Builds, Views, Jobs) into easily managed Python objects:

.. code-block:: python

	from jenkinsapi.jenkins import Jenkins
	J = Jenkins('http://localhost:8080')
	print(J.version) # 1.542
	print(J.keys()) # foo, test_jenkinsapi
	print(J.get('test_jenkinsapi')) # <jenkinsapi.job.Job test_jenkinsapi>
	print(J.get('test_jenkinsapi').get_last_good_build()) # <jenkinsapi.build.Build test_jenkinsapi #77>

More examples available on `Github <https://github.com/pycontribs/jenkinsapi/tree/master/examples>`_

Testing
-------

If you have installed the test dependencies on your system already, you can run
the testsuite with the following command:

.. code-block:: bash

    uv sync
    uv run pytest -sv --cov=jenkinsapi --cov-report=term-missing --cov-report=xml jenkinsapi_tests

Otherwise using a virtualenv is recommended. Setuptools will automatically fetch
missing test dependencies:

.. code-block:: bash

    uv venv
    uv python install
    uv run pytest -sv --cov=jenkinsapi --cov-report=term-missing --cov-report=xml jenkinsapi_tests

Development
-----------

* Make sure that you have Java_ installed. Jenkins will be automatically
  downloaded and started during tests.
* Create virtual environment for development
* Install package in development mode

.. code-block:: bash

    uv sync

* Make your changes, write tests and check your code

.. code-block:: bash

    uv run pytest -sv

Python versions
---------------

The project has been tested against Python versions:

* 3.8 - 3.13

Jenkins versions
----------------

Project tested on both stable (LTS) and latest Jenkins versions.

Project Contributors
--------------------

* Aleksey Maksimov (ctpeko3a@gmail.com)
* Salim Fadhley (sal@stodge.org)
* Ramon van Alteren (ramon@vanalteren.nl)
* Ruslan Lutsenko (ruslan.lutcenko@gmail.com)
* Cleber J Santos (cleber@simplesconsultoria.com.br)
* William Zhang (jollychang@douban.com)
* Victor Garcia (bravejolie@gmail.com)
* Bradley Harris (bradley@ninelb.com)
* Kyle Rockman (kyle.rockman@mac.com)
* Sascha Peilicke (saschpe@gmx.de)
* David Johansen (david@makewhat.is)
* Misha Behersky (bmwant@gmail.com)
* Clinton Steiner (clintonsteiner@gmail.com)

Please do not contact these contributors directly for support questions! Use the GitHub tracker instead.

.. _Java: https://www.oracle.com/java/technologies/downloads/#java21


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "jenkinsapi",
    "maintainer": null,
    "docs_url": "https://pythonhosted.org/jenkinsapi/",
    "requires_python": ">=3.8",
    "maintainer_email": "Aleksey Maksimov <ctpeko3a@gmail.com>, Clinton Steiner <clintonsteiner@gmail.com>",
    "keywords": null,
    "author": null,
    "author_email": "Salim Fadhley <salimfadhley@gmail.com>, Aleksey Maksimov <ctpeko3a@gmail.com>, Clinton Steiner <clintonsteiner@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f1/d8/a276dad87ca55fe6c3293680c2fdb6045c91f6073be3bec19e7c07824374/jenkinsapi-0.3.14.tar.gz",
    "platform": null,
    "description": "Jenkinsapi\n==========\n\n.. image:: https://badge.fury.io/py/jenkinsapi.png\n    :target: http://badge.fury.io/py/jenkinsapi\n\n.. image:: https://codecov.io/gh/pycontribs/jenkinsapi/branch/master/graph/badge.svg\n        :target: https://codecov.io/gh/pycontribs/jenkinsapi\n\nAbout this library\n-------------------\n\nJenkins is the market leading continuous integration system, originally created by Kohsuke Kawaguchi.\n\nJenkins (and its predecessor Hudson) are useful projects for automating common development tasks (e.g. unit-testing, production batches) - but they are somewhat Java-centric.\n| Jenkinsapi makes scripting Jenkins tasks a breeze by wrapping the REST api into familiar python objects.\n| Here is a list of some of the most commonly used functionality\n\n* Add, remove, and query Jenkins jobs\n* Control pipeline execution\n    * Query the results of a completed build\n    * Block until jobs are complete or run jobs asyncronously\n    * Get objects representing the latest builds of a job\n* Artifact management\n    * Search for artifacts by simple criteria\n    * Install artifacts to custom-specified directory structures\n* Search for builds by source code revision\n* Create, destroy, and monitor\n    * Build nodes (Webstart and SSH slaves)\n    * Views (including nested views using NestedViews Jenkins plugin)\n    * Credentials (username/password and ssh key)\n* Authentication support for username and password\n* Manage jenkins and plugin installation\n\nFull library capabilities are outlined in the `Documentation <http://pycontribs.github.io/jenkinsapi/>`__\n\n\nKnown issues\n------------\n* Job deletion operations fail unless Cross-Site scripting protection is disabled.\n\nFor other issues, please refer to the `support URL <https://github.com/pycontribs/jenkinsapi/issues?direction=desc&sort=comments&state=open>`_\n\nImportant Links\n---------------\n* `Support and bug-reports <https://github.com/pycontribs/jenkinsapi/issues?direction=desc&sort=comments&state=open>`_\n* `Source Code <https://github.com/pycontribs/jenkinsapi>`_\n* `Documentation <http://pycontribs.github.io/jenkinsapi/>`__\n* `Releases <http://pypi.python.org/pypi/jenkinsapi>`_\n\nInstallation\n-------------\n\nEgg-files for this project are hosted on PyPi. Most Python users should be able to use pip or setuptools to automatically install this project.\n\nUsing Pip or Setuptools\n^^^^^^^^^^^^^^^^^^^^^^^\n\nMost users can do the following:\n\n.. code-block:: bash\n\n\tpip install jenkinsapi\n\nUsing your operating-system's package manager\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nUbuntu users can now use apt to install this package:\n\n.. code-block:: bash\n\n    apt-get install python-jenkinsapi\n\nBeware that this technique will get a somewhat older version of Jenkinsapi.\n\nExample\n-------\n\nJenkinsAPI is intended to map the objects in Jenkins (e.g. Builds, Views, Jobs) into easily managed Python objects:\n\n.. code-block:: python\n\n\tfrom jenkinsapi.jenkins import Jenkins\n\tJ = Jenkins('http://localhost:8080')\n\tprint(J.version) # 1.542\n\tprint(J.keys()) # foo, test_jenkinsapi\n\tprint(J.get('test_jenkinsapi')) # <jenkinsapi.job.Job test_jenkinsapi>\n\tprint(J.get('test_jenkinsapi').get_last_good_build()) # <jenkinsapi.build.Build test_jenkinsapi #77>\n\nMore examples available on `Github <https://github.com/pycontribs/jenkinsapi/tree/master/examples>`_\n\nTesting\n-------\n\nIf you have installed the test dependencies on your system already, you can run\nthe testsuite with the following command:\n\n.. code-block:: bash\n\n    uv sync\n    uv run pytest -sv --cov=jenkinsapi --cov-report=term-missing --cov-report=xml jenkinsapi_tests\n\nOtherwise using a virtualenv is recommended. Setuptools will automatically fetch\nmissing test dependencies:\n\n.. code-block:: bash\n\n    uv venv\n    uv python install\n    uv run pytest -sv --cov=jenkinsapi --cov-report=term-missing --cov-report=xml jenkinsapi_tests\n\nDevelopment\n-----------\n\n* Make sure that you have Java_ installed. Jenkins will be automatically\n  downloaded and started during tests.\n* Create virtual environment for development\n* Install package in development mode\n\n.. code-block:: bash\n\n    uv sync\n\n* Make your changes, write tests and check your code\n\n.. code-block:: bash\n\n    uv run pytest -sv\n\nPython versions\n---------------\n\nThe project has been tested against Python versions:\n\n* 3.8 - 3.13\n\nJenkins versions\n----------------\n\nProject tested on both stable (LTS) and latest Jenkins versions.\n\nProject Contributors\n--------------------\n\n* Aleksey Maksimov (ctpeko3a@gmail.com)\n* Salim Fadhley (sal@stodge.org)\n* Ramon van Alteren (ramon@vanalteren.nl)\n* Ruslan Lutsenko (ruslan.lutcenko@gmail.com)\n* Cleber J Santos (cleber@simplesconsultoria.com.br)\n* William Zhang (jollychang@douban.com)\n* Victor Garcia (bravejolie@gmail.com)\n* Bradley Harris (bradley@ninelb.com)\n* Kyle Rockman (kyle.rockman@mac.com)\n* Sascha Peilicke (saschpe@gmx.de)\n* David Johansen (david@makewhat.is)\n* Misha Behersky (bmwant@gmail.com)\n* Clinton Steiner (clintonsteiner@gmail.com)\n\nPlease do not contact these contributors directly for support questions! Use the GitHub tracker instead.\n\n.. _Java: https://www.oracle.com/java/technologies/downloads/#java21\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python API for accessing resources on a Jenkins continuous-integration server.",
    "version": "0.3.14",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f44d8f81e3b2a1b8f773770976ff275bc211f6e4a741b213b957f272b181bd11",
                "md5": "e5c9365d13d92a7141f30263f216550e",
                "sha256": "9481701bb81dcb6edf699e30ec496b57aff37212eab40bfba717efd8ccc2aa0b"
            },
            "downloads": -1,
            "filename": "jenkinsapi-0.3.14-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e5c9365d13d92a7141f30263f216550e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 70926,
            "upload_time": "2025-03-18T10:36:28",
            "upload_time_iso_8601": "2025-03-18T10:36:28.706596Z",
            "url": "https://files.pythonhosted.org/packages/f4/4d/8f81e3b2a1b8f773770976ff275bc211f6e4a741b213b957f272b181bd11/jenkinsapi-0.3.14-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f1d8a276dad87ca55fe6c3293680c2fdb6045c91f6073be3bec19e7c07824374",
                "md5": "232beacbaf42d30d6945a4c155a0b025",
                "sha256": "1be5a3d60bb97b8fd5a9d9d4477e2201e07e4725a7d42c0eb16846bb879e4b97"
            },
            "downloads": -1,
            "filename": "jenkinsapi-0.3.14.tar.gz",
            "has_sig": false,
            "md5_digest": "232beacbaf42d30d6945a4c155a0b025",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 57642,
            "upload_time": "2025-03-18T10:36:29",
            "upload_time_iso_8601": "2025-03-18T10:36:29.827135Z",
            "url": "https://files.pythonhosted.org/packages/f1/d8/a276dad87ca55fe6c3293680c2fdb6045c91f6073be3bec19e7c07824374/jenkinsapi-0.3.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-03-18 10:36:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "jenkinsapi"
}
        
Elapsed time: 1.37907s