{"id":27681,"library":"dci-utils","title":"DCI Utilities","description":"A set of Python utilities for DCI (Distributed CI) jobs. Version 0.0.1148 is the latest; releases are frequent (hundreds of minor increments).","status":"active","version":"0.0.1148","language":"python","source_language":"en","source_url":"https://github.com/redhat-cip/dci-utils","tags":["dci","ci","utilities","distributed-ci"],"install":[{"cmd":"pip install dci-utils","lang":"bash","label":"Default install from PyPI"}],"dependencies":[{"reason":"Required for DCI API interaction.","package":"python-dciclient","optional":false}],"imports":[{"note":"Common mistake is to import from 'dci_utils.utils' or similar.","wrong":"","symbol":"DCIUtilsError","correct":"from dci_utils import DCIUtilsError"},{"note":"Functions may be hidden in submodules; always prefer top-level imports.","wrong":"","symbol":"get_job_info","correct":"from dci_utils import get_job_info"}],"quickstart":{"code":"from dci_utils import get_job_info\nfrom dci_utils import DCIUtilsError\nimport os\n\n# Set environment variables or use defaults\nos.environ['DCI_LOGIN'] = os.environ.get('DCI_LOGIN', 'admin')\nos.environ['DCI_PASSWORD'] = os.environ.get('DCI_PASSWORD', '')\n\ntry:\n    info = get_job_info(job_id='12345')\n    print(info)\nexcept DCIUtilsError as e:\n    print(f'Error: {e}')\n","lang":"python","description":"Fetch job info using the DCI remote API."},"warnings":[{"fix":"Use Python 3.6+ and run 'pip install --upgrade dci-utils'.","message":"v0.0.1000+ dropped support for Python 2.7. All users must migrate to Python 3.6+.","severity":"breaking","affected_versions":">=0.0.1000"},{"fix":"Use 'from dci_utils import ...' – note the underscore.","message":"The top-level module is 'dci_utils' (with underscore), not 'dciutils' (no underscore). Many examples mistakenly use the wrong hyphenated form.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace calls to get_job_files() with list_job_files().","message":"The function 'get_job_files()' is deprecated in v0.0.1100+ and will be removed. Use 'list_job_files()' instead.","severity":"deprecated","affected_versions":">=0.0.1100"},{"fix":"Set DCI_LOGIN and DCI_PASSWORD before using any remote function.","message":"Environment variables DCI_LOGIN and DCI_PASSWORD are required for API calls. If not set, the library fails silently with a cryptic error.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'import dci_utils' (with underscore).","cause":"Importing with the wrong module name (dciutils vs dci_utils).","error":"ModuleNotFoundError: No module named 'dciutils'"},{"fix":"Avoid 'from dci_utils import *'; instead import specific functions.","cause":"Using 'from dci_utils import *' which may overwrite built-in names (e.g., 'id', 'type').","error":"TypeError: 'str' object is not callable"},{"fix":"Ensure DCI_LOGIN and DCI_PASSWORD are set correctly, e.g., `os.environ['DCI_LOGIN'] = 'myuser'`.","cause":"Missing or incorrect DCI_LOGIN or DCI_PASSWORD environment variables.","error":"dci_utils.exceptions.DCIUtilsError: Failed to authenticate"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}