{"id":10168,"library":"python-redmine","title":"Python Redmine Library","description":"Python-Redmine is a comprehensive library for programmatic interaction with the Redmine project management application. It allows users to manage issues, projects, users, and other Redmine resources through a Pythonic interface. The current version is 2.5.0, with new releases typically coming a few times a year, often including support for RedmineUP's Pro Edition plugins.","status":"active","version":"2.5.0","language":"en","source_language":"en","source_url":"https://github.com/maxtepkeev/python-redmine","tags":["redmine","api-client","project-management","issue-tracker","rest-api"],"install":[{"cmd":"pip install python-redmine","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Used for HTTP communication with the Redmine API. It became an external dependency in v2.2.0.","package":"requests","optional":false}],"imports":[{"note":"The top-level package for import is `redminelib`, not `python_redmine`.","wrong":"from python_redmine import Redmine","symbol":"Redmine","correct":"from redminelib import Redmine"},{"note":"Exceptions are in a dedicated submodule.","symbol":"RedmineError","correct":"from redminelib.exceptions import RedmineError"}],"quickstart":{"code":"import os\nfrom redminelib import Redmine\nfrom redminelib.exceptions import ResourceNotFoundError\n\n# Replace with your Redmine URL and API Key\nREDMINE_URL = os.environ.get('REDMINE_URL', 'http://localhost:3000')\nREDMINE_API_KEY = os.environ.get('REDMINE_API_KEY', 'YOUR_API_KEY_HERE')\n\ntry:\n    redmine = Redmine(REDMINE_URL, key=REDMINE_API_KEY)\n    \n    # Get current user\n    me = redmine.user.get('current')\n    print(f\"Connected to Redmine as: {me.firstname} {me.lastname} ({me.login})\")\n\n    # Get a list of projects\n    projects = redmine.project.all(limit=5)\n    print(\"\\nFirst 5 Projects:\")\n    for project in projects:\n        print(f\" - {project.name} (ID: {project.id})\")\n        \n    # Try to get a specific issue\n    try:\n        issue = redmine.issue.get(1)\n        print(f\"\\nIssue #1: {issue.subject} (Status: {issue.status.name})\")\n    except ResourceNotFoundError:\n        print(\"\\nIssue #1 not found.\")\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")","lang":"python","description":"This quickstart connects to a Redmine instance using an API key, fetches information about the current user, lists the first five projects, and attempts to retrieve a specific issue by ID. Ensure you have your Redmine URL and API key configured."},"warnings":[{"fix":"Upgrade your Python environment to 3.7 or newer. For older Python versions, use python-redmine < 2.2.0 or < 2.4.0 depending on your exact version.","message":"Python 2.x, 3.3, 3.5, and 3.6 support has been dropped. Python-Redmine now requires Python >= 3.7.","severity":"breaking","affected_versions":">=2.4.0 (for 3.5, 3.6), >=2.2.0 (for 2.x, 3.3)"},{"fix":"Ensure `requests` is installed explicitly via `pip install requests` alongside `python-redmine`. This is now handled automatically by `pip install python-redmine`.","message":"The `requests` package, previously vendored, became an external dependency. If you were relying on it being bundled, your code might fail.","severity":"breaking","affected_versions":">=2.2.0"},{"fix":"Always install the latest `python-redmine` which will pull in a compatible `requests` version, or explicitly update `requests` to meet the library's minimum requirements (e.g., `pip install requests --upgrade`).","message":"Minimum `requests` version requirements are periodically updated (e.g., to >= 2.31.0 in v2.5.0, >= 2.28.2 in v2.4.0). Using an older `requests` version might lead to dependency conflicts or unexpected behavior.","severity":"gotcha","affected_versions":">=2.4.0"},{"fix":"Check the Python-Redmine documentation for specific feature requirements. Ensure your Redmine server version meets the minimum required version for the functionality you are trying to use (e.g., Redmine >= 4.1.0 for some `/my/account` and News features).","message":"Some features, like the `/my/account` endpoint for non-admin users (`redmine.user.get('me')`), News API, or RedmineUP plugin support, require a minimum Redmine API version.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Change your import statement to `from redminelib import Redmine`.","cause":"Incorrect import path. The main package for importing classes is `redminelib`, not `python_redmine`.","error":"from python_redmine import Redmine\nModuleNotFoundError: No module named 'python_redmine'"},{"fix":"Verify the ID you are using is correct and that the user associated with the API key has permissions to view that resource. Check Redmine directly to confirm the resource's existence and visibility.","cause":"Attempted to access a Redmine resource (e.g., issue, project, user) with an ID that does not exist or is inaccessible.","error":"redminelib.exceptions.ResourceNotFoundError: The resource you are trying to access doesn't exist."},{"fix":"Ensure you are passing a valid API key to the `Redmine` constructor (e.g., `key='YOUR_API_KEY'`). Verify that API authentication is enabled in your Redmine server settings (Administration -> Settings -> Authentication -> 'Enable REST API').","cause":"The Redmine API key was not provided or is incorrect, or the Redmine server is not configured to accept API key authentication.","error":"redminelib.exceptions.RedmineError: No 'X-Redmine-API-Key' header found."},{"fix":"Double-check the `REDMINE_URL` you are using. Ensure the Redmine server is running and accessible from where you are running your Python code. Verify any firewalls or proxies are not blocking the connection.","cause":"The Redmine URL is incorrect, the server is offline, or there is a network issue preventing connection to the Redmine instance.","error":"requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))"}]}