The `kanboard` library is a Python client for interacting with the Kanboard API (version 1.1.8). It provides both synchronous and asynchronous access to all Kanboard API methods, dynamically mapping Python calls to JSON-RPC procedures. The library is actively maintained with regular releases and requires Python 3.9 or higher.
pip install kanboardVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Kanboard client and create a new project. It uses environment variables for the API URL, username, and token for secure credential management. It also includes basic error handling and a check to prevent duplicate project creation.
Upgrade your Python environment to 3.9 or higher. If unable to upgrade, pin the `kanboard` library version to `<1.1.7` (e.g., `pip install kanboard==1.1.6`).
Always pass arguments to API methods using their keyword names (e.g., `kb.create_project(name='My Project')` instead of `kb.create_project('My Project')`).When using `async/await` syntax, ensure method names are suffixed with `_async` for asynchronous execution.
If your Kanboard `config.php` defines `API_AUTHENTICATION_HEADER`, pass `auth_header='X-Your-Custom-Header'` to the `kanboard.Client` constructor.
Ensure the API token or user credentials have the required permissions in Kanboard. For 'jsonrpc' user, remember it cannot access 'My...' procedures. Verify the API token is correct and active. Check Kanboard's server logs for more details on the 403 error.
Double-check the `username` and `password` (or `API_TOKEN`) passed to `kanboard.Client`. Ensure they match an active Kanboard user or a valid API token. For users with 2FA, API keys must be used.
Refactor your API calls to use keyword arguments instead of positional arguments (e.g., `kb.create_project(name='My Project')` instead of `kb.create_project('My Project')`).