kanboard


Namekanboard JSON
Version 1.1.6 PyPI version JSON
download
home_pageNone
SummaryClient library for Kanboard
upload_time2024-12-08 22:05:33
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseThe MIT License (MIT) Copyright (c) Frederic Guillot Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords kanboard api client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ==============================
Python API Client for Kanboard
==============================

Client library for Kanboard API.

- Author: Frédéric Guillot
- License: MIT

Installation
============

.. code-block:: bash

    python3 -m pip install kanboard


This library is compatible with Python >= 3.7.

Note: **Support for Python 2.7 has been dropped since version 1.1.0.**

On Fedora (36 and later), you can install the package using DNF:

.. code-block:: bash

    dnf install python3-kanboard


Examples
========

Methods and arguments are the same as the JSON-RPC procedures described in the
`official documentation <https://docs.kanboard.org/v1/api/>`_.

Python methods are dynamically mapped to the API procedures: **You must use named arguments**.

By default, calls are made synchronously, meaning that they will block the program until completed.

Creating a new team project
---------------------------

.. code-block:: python

    import kanboard

    kb = kanboard.Client('http://localhost/jsonrpc.php', 'jsonrpc', 'your_api_token')
    project_id = kb.create_project(name='My project')


Authenticate as user
--------------------

.. code-block:: python

    import kanboard

    kb = kanboard.Client('http://localhost/jsonrpc.php', 'admin', 'secret')
    kb.get_my_projects()

Create a new task
-----------------

.. code-block:: python

    import kanboard

    kb = kanboard.Client('http://localhost/jsonrpc.php', 'jsonrpc', 'your_api_token')
    project_id = kb.create_project(name='My project')
    task_id = kb.create_task(project_id=project_id, title='My task title')

Use a personalized user agent
-----------------------------

.. code-block:: python

    import kanboard

    kb = kanboard.Client(url='http://localhost/jsonrpc.php',
                         username='admin',
                         password='secret',
                         user_agent='My Kanboard client')

SSL connection and self-signed certificates
===========================================

Example with a valid certificate:

.. code-block:: python

    import kanboard

    kb = kanboard.Client('https://example.org/jsonrpc.php', 'admin', 'secret')
    kb.get_my_projects()

Example with a custom certificate:

.. code-block:: python

    import kanboard

    kb = kanboard.Client(url='https://example.org/jsonrpc.php',
                         username='admin',
                         password='secret',
                         cafile='/path/to/my/cert.pem')
    kb.get_my_projects()

Example with a custom certificate and hostname mismatch:

.. code-block:: python

    import kanboard

    kb = kanboard.Client(url='https://example.org/jsonrpc.php',
                         username='admin',
                         password='secret',
                         cafile='/path/to/my/cert.pem',
                         ignore_hostname_verification=True)
    kb.get_my_projects()

Ignore invalid/expired certificates and hostname mismatches, which will make your application vulnerable to man-in-the-middle (MitM) attacks:

.. code-block:: python

    import kanboard

    kb = kanboard.Client(url='https://example.org/jsonrpc.php',
                         username='admin',
                         password='secret',
                         insecure=True)
    kb.get_my_projects()

Asynchronous I/O
================

The client also exposes async/await style method calls. Similarly to the synchronous calls (see above),
the method names are mapped to the API methods.

To invoke an asynchronous call, the method name must be appended with ``_async``. For example, a synchronous call
to ``create_project`` can be made asynchronous by calling ``create_project_async`` instead.

.. code-block:: python

    import asyncio
    import kanboard

    kb = kanboard.Client('http://localhost/jsonrpc.php', 'jsonrpc', 'your_api_token')

    loop = asyncio.get_event_loop()
    project_id = loop.run_until_complete(kb.create_project_async(name='My project'))


.. code-block:: python

    import asyncio
    import kanboard

    async def call_within_function():
        kb = kanboard.Client('http://localhost/jsonrpc.php', 'jsonrpc', 'your_api_token')
        return await kb.create_project_async(name='My project')

    loop = asyncio.get_event_loop()
    project_id = loop.run_until_complete(call_within_function())


See the `official API documentation <https://docs.kanboard.org/v1/api/>`_ for the complete list of
methods and arguments.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "kanboard",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "kanboard, api, client",
    "author": null,
    "author_email": "Fr\u00e9d\u00e9ric Guillot <fred@kanboard.net>",
    "download_url": "https://files.pythonhosted.org/packages/ed/46/5af4c66d5dba45ee956dcb54d84c6cb52937d020d587986c70fb681b1948/kanboard-1.1.6.tar.gz",
    "platform": null,
    "description": "==============================\nPython API Client for Kanboard\n==============================\n\nClient library for Kanboard API.\n\n- Author: Fr\u00e9d\u00e9ric Guillot\n- License: MIT\n\nInstallation\n============\n\n.. code-block:: bash\n\n    python3 -m pip install kanboard\n\n\nThis library is compatible with Python >= 3.7.\n\nNote: **Support for Python 2.7 has been dropped since version 1.1.0.**\n\nOn Fedora (36 and later), you can install the package using DNF:\n\n.. code-block:: bash\n\n    dnf install python3-kanboard\n\n\nExamples\n========\n\nMethods and arguments are the same as the JSON-RPC procedures described in the\n`official documentation <https://docs.kanboard.org/v1/api/>`_.\n\nPython methods are dynamically mapped to the API procedures: **You must use named arguments**.\n\nBy default, calls are made synchronously, meaning that they will block the program until completed.\n\nCreating a new team project\n---------------------------\n\n.. code-block:: python\n\n    import kanboard\n\n    kb = kanboard.Client('http://localhost/jsonrpc.php', 'jsonrpc', 'your_api_token')\n    project_id = kb.create_project(name='My project')\n\n\nAuthenticate as user\n--------------------\n\n.. code-block:: python\n\n    import kanboard\n\n    kb = kanboard.Client('http://localhost/jsonrpc.php', 'admin', 'secret')\n    kb.get_my_projects()\n\nCreate a new task\n-----------------\n\n.. code-block:: python\n\n    import kanboard\n\n    kb = kanboard.Client('http://localhost/jsonrpc.php', 'jsonrpc', 'your_api_token')\n    project_id = kb.create_project(name='My project')\n    task_id = kb.create_task(project_id=project_id, title='My task title')\n\nUse a personalized user agent\n-----------------------------\n\n.. code-block:: python\n\n    import kanboard\n\n    kb = kanboard.Client(url='http://localhost/jsonrpc.php',\n                         username='admin',\n                         password='secret',\n                         user_agent='My Kanboard client')\n\nSSL connection and self-signed certificates\n===========================================\n\nExample with a valid certificate:\n\n.. code-block:: python\n\n    import kanboard\n\n    kb = kanboard.Client('https://example.org/jsonrpc.php', 'admin', 'secret')\n    kb.get_my_projects()\n\nExample with a custom certificate:\n\n.. code-block:: python\n\n    import kanboard\n\n    kb = kanboard.Client(url='https://example.org/jsonrpc.php',\n                         username='admin',\n                         password='secret',\n                         cafile='/path/to/my/cert.pem')\n    kb.get_my_projects()\n\nExample with a custom certificate and hostname mismatch:\n\n.. code-block:: python\n\n    import kanboard\n\n    kb = kanboard.Client(url='https://example.org/jsonrpc.php',\n                         username='admin',\n                         password='secret',\n                         cafile='/path/to/my/cert.pem',\n                         ignore_hostname_verification=True)\n    kb.get_my_projects()\n\nIgnore invalid/expired certificates and hostname mismatches, which will make your application vulnerable to man-in-the-middle (MitM) attacks:\n\n.. code-block:: python\n\n    import kanboard\n\n    kb = kanboard.Client(url='https://example.org/jsonrpc.php',\n                         username='admin',\n                         password='secret',\n                         insecure=True)\n    kb.get_my_projects()\n\nAsynchronous I/O\n================\n\nThe client also exposes async/await style method calls. Similarly to the synchronous calls (see above),\nthe method names are mapped to the API methods.\n\nTo invoke an asynchronous call, the method name must be appended with ``_async``. For example, a synchronous call\nto ``create_project`` can be made asynchronous by calling ``create_project_async`` instead.\n\n.. code-block:: python\n\n    import asyncio\n    import kanboard\n\n    kb = kanboard.Client('http://localhost/jsonrpc.php', 'jsonrpc', 'your_api_token')\n\n    loop = asyncio.get_event_loop()\n    project_id = loop.run_until_complete(kb.create_project_async(name='My project'))\n\n\n.. code-block:: python\n\n    import asyncio\n    import kanboard\n\n    async def call_within_function():\n        kb = kanboard.Client('http://localhost/jsonrpc.php', 'jsonrpc', 'your_api_token')\n        return await kb.create_project_async(name='My project')\n\n    loop = asyncio.get_event_loop()\n    project_id = loop.run_until_complete(call_within_function())\n\n\nSee the `official API documentation <https://docs.kanboard.org/v1/api/>`_ for the complete list of\nmethods and arguments.\n",
    "bugtrack_url": null,
    "license": "The MIT License (MIT)  Copyright (c) Frederic Guillot  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Client library for Kanboard",
    "version": "1.1.6",
    "project_urls": {
        "Bug Reports": "https://github.com/kanboard/python-api-client/issues",
        "Homepage": "https://github.com/kanboard/python-api-client",
        "Source": "https://github.com/kanboard/python-api-client"
    },
    "split_keywords": [
        "kanboard",
        " api",
        " client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "992cf07958c3043c1e44a08967c527885f19e6200a7a4280cbdf560c130735cf",
                "md5": "787f63274953596da2af41b25c17031c",
                "sha256": "b0614d7b3548fe6b9af5064f883ec7df0c0234b12882e81481caa1dbb825fa0e"
            },
            "downloads": -1,
            "filename": "kanboard-1.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "787f63274953596da2af41b25c17031c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 6354,
            "upload_time": "2024-12-08T22:05:31",
            "upload_time_iso_8601": "2024-12-08T22:05:31.765944Z",
            "url": "https://files.pythonhosted.org/packages/99/2c/f07958c3043c1e44a08967c527885f19e6200a7a4280cbdf560c130735cf/kanboard-1.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed465af4c66d5dba45ee956dcb54d84c6cb52937d020d587986c70fb681b1948",
                "md5": "2420fe050161752eb9db793a5154f591",
                "sha256": "6625849401a39681eade3de7770111768f6cd485acaf0d775bcf092f349479de"
            },
            "downloads": -1,
            "filename": "kanboard-1.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "2420fe050161752eb9db793a5154f591",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 5855,
            "upload_time": "2024-12-08T22:05:33",
            "upload_time_iso_8601": "2024-12-08T22:05:33.536869Z",
            "url": "https://files.pythonhosted.org/packages/ed/46/5af4c66d5dba45ee956dcb54d84c6cb52937d020d587986c70fb681b1948/kanboard-1.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-08 22:05:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kanboard",
    "github_project": "python-api-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "kanboard"
}
        
Elapsed time: 0.36548s