{"id":21186,"library":"dxpy","title":"DNAnexus Python SDK (dxpy)","description":"DNAnexus Platform API bindings for Python (dxpy). Current version 0.408.2, requires Python >=3.8. Used to interact with the DNAnexus platform for managing genomic data, workflows, and analyses. Actively maintained with frequent releases.","status":"active","version":"0.408.2","language":"python","source_language":"en","source_url":"https://github.com/dnanexus/dx-toolkit","tags":["dnanexus","genomics","bioinformatics","api","sdk"],"install":[{"cmd":"pip install dxpy","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"DXHTTPRequest is not in the public API; use dxpy.DXHTTPRequest() from the top-level import.","wrong":"from dxpy import DXHTTPRequest","symbol":"DXHTTPRequest","correct":"import dxpy"},{"note":"Many classes are re-exported from the top-level `dxpy` package. Prefer `dxpy.DXJob` over deeply nested imports.","wrong":"from dxpy.exceptions import *","symbol":"DXJob","correct":"import dxpy"}],"quickstart":{"code":"import os\nimport dxpy\n\ndxpy.set_security_context({\n    'auth_token': os.environ.get('DX_AUTH_TOKEN', ''),\n    'project_id': os.environ.get('DX_PROJECT_ID', '')\n})\n\n# List projects\nfor p in dxpy.find_projects():\n    print(p.name)","lang":"python","description":"Sets authentication and lists accessible projects."},"warnings":[{"fix":"Use Python 3.8+ and update any deprecated API calls.","message":"Python 2 support dropped in dxpy >=0.300. Upgrade your code to Python 3.8+.","severity":"breaking","affected_versions":">=0.300"},{"fix":"Use `import dxpy` and call `dxpy.DXHTTPRequest()`.","message":"Don't import individual submodules (e.g., `from dxpy import DXHTTPRequest`). Always use `import dxpy` and access attributes via `dxpy.`.","severity":"gotcha","affected_versions":"all"},{"fix":"Set environment variables or call `dxpy.set_security_context()` with explicit credentials.","message":"Environment vars `DX_AUTH_TOKEN` and `DX_PROJECT_ID` must be set or authentication will fail silently.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `pip install dxpy` in the target environment.","cause":"dxpy not installed or not in the current Python environment.","error":"ImportError: No module named dxpy"},{"fix":"Set `DX_AUTH_TOKEN` environment variable or use `dxpy.set_security_context({'auth_token': '...'})`.","cause":"Auth token missing or expired.","error":"dxpy.exceptions.DXAPIError: Authentication required"},{"fix":"Upgrade dxpy: `pip install --upgrade dxpy` and ensure you use `import dxpy`.","cause":"Outdated dxpy version (<0.300) or incorrect import.","error":"AttributeError: module 'dxpy' has no attribute 'DXJob'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}