Skip to main content

Client library for Kanboard

Project description

Client library for Kanboard API.

  • Author: Frédéric Guillot

  • License: MIT

Installation

pip install kanboard

This library is compatible with Python >= 3.5.

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:

dnf install python3-kanboard

Examples

Methods and arguments are the same as the JSON-RPC procedures described in the official documentation.

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

import kanboard

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

Authenticate as user

import kanboard

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

Create a new task

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

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.

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'))
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 for the complete list of methods and arguments.

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

kanboard-1.1.4.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

kanboard-1.1.4-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file kanboard-1.1.4.tar.gz.

File metadata

  • Download URL: kanboard-1.1.4.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for kanboard-1.1.4.tar.gz
Algorithm Hash digest
SHA256 77fffbae9c755c48f75a9b38496e1a2e0c031e17e2364268e0a38898805ded4b
MD5 da83e75a75411132f94ecac5c9565dff
BLAKE2b-256 1959fa10fe3e626887f24c0b9fbcd502adecc3fc1f1d2557927fe0e43f226ab5

See more details on using hashes here.

File details

Details for the file kanboard-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: kanboard-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for kanboard-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d58a6947d73481c74cf3a16059690a8ebd3e0115f625979c90c57014c104af5e
MD5 3907e4ed2474dd095c24f07f766d4e33
BLAKE2b-256 208745ff655fc60f29bd77a964ef9d3cb49dd0ae053a03fa23fdb0b5da26c33d

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