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.

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.3.tar.gz (4.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: kanboard-1.1.3.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for kanboard-1.1.3.tar.gz
Algorithm Hash digest
SHA256 8983519bfa6e1cfc7feba0fe0e635aab85af88b6667ce6f4e1bb2ca5aa1c3a1e
MD5 f363d69f7125fe0b9164f73a5ec24cc7
BLAKE2b-256 6ae85bff61a2adddbc9611ae4741512bf4db61fca31d3e8c878394853e3db2e8

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