{"id":7337,"library":"kanboard","title":"Kanboard Python API Client","description":"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.","status":"active","version":"1.1.8","language":"en","source_language":"en","source_url":"https://github.com/kanboard/python-api-client","tags":["kanboard","api-client","task-management","project-management","json-rpc","web-api"],"install":[{"cmd":"pip install kanboard","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Requires Python 3.9 or higher for compatibility.","package":"python","optional":false}],"imports":[{"symbol":"Client","correct":"from kanboard import Client"},{"note":"Used for catching API-specific errors.","symbol":"ClientError","correct":"from kanboard import ClientError"}],"quickstart":{"code":"import os\nimport kanboard\n\nKANBOARD_URL = os.environ.get('KANBOARD_API_URL', 'http://localhost/jsonrpc.php')\nKANBOARD_USERNAME = os.environ.get('KANBOARD_API_USERNAME', 'jsonrpc') # Use 'jsonrpc' for application token\nKANBOARD_API_TOKEN = os.environ.get('KANBOARD_API_TOKEN', 'your_api_token') # Or user password/personal access token\n\ntry:\n    # Initialize the client, using 'jsonrpc' user and an API token\n    with kanboard.Client(KANBOARD_URL, KANBOARD_USERNAME, KANBOARD_API_TOKEN) as kb:\n        # Kanboard API calls expect named arguments\n        # Check if project 'My Test Project' already exists to avoid creation error\n        projects = kb.get_all_projects()\n        project_exists = any(p.get('name') == 'My Test Project' for p in projects)\n\n        if not project_exists:\n            project_id = kb.create_project(name=\"My Test Project\")\n            print(f\"Project 'My Test Project' created with ID: {project_id}\")\n        else:\n            print(\"Project 'My Test Project' already exists.\")\n\n        # Example of getting current user information (requires user credentials, not 'jsonrpc' token)\n        # If KANBOARD_USERNAME is an actual user, you could call:\n        # me = kb.get_me()\n        # print(f\"Connected as: {me.get('username')}\")\n\nexcept kanboard.ClientError as e:\n    print(f\"An API or network error occurred: {e}\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")","lang":"python","description":"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."},"warnings":[{"fix":"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`).","message":"Support for Python 3.7 and 3.8 was dropped in version 1.1.7. Users on older Python versions will need to upgrade to Python 3.9+ or use an older version of the library.","severity":"breaking","affected_versions":">=1.1.7"},{"fix":"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')`).","message":"All Kanboard API methods, when called via the Python client, require named arguments. Positional arguments will not work.","severity":"gotcha","affected_versions":"All versions"},{"fix":"When using `async/await` syntax, ensure method names are suffixed with `_async` for asynchronous execution.","message":"For asynchronous API calls, you must append `_async` to the method name (e.g., `kb.create_project_async`).","severity":"gotcha","affected_versions":"All versions"},{"fix":"If your Kanboard `config.php` defines `API_AUTHENTICATION_HEADER`, pass `auth_header='X-Your-Custom-Header'` to the `kanboard.Client` constructor.","message":"Kanboard instances configured with a custom authentication header require specifying the `auth_header` parameter during client initialization.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"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.","cause":"This typically indicates an authorization issue. The user or API token used does not have the necessary permissions to perform the requested action. For 'jsonrpc' user, this could mean accessing 'My...' methods.","error":"kanboard.ClientError: HTTP Error 403: Forbidden"},{"fix":"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.","cause":"Incorrect username or API token/password provided for authentication.","error":"kanboard.ClientError: HTTP Error 401: Not Authorized"},{"fix":"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')`).","cause":"Kanboard client API methods expect named arguments only.","error":"TypeError: Call takes no positional arguments but 1 positional argument was given"}]}