{"id":27781,"library":"ga4gh-drs-client","title":"GA4GH DRS Client","description":"A Python client for retrieving omics data from Data Repository Service (DRS) web services compliant with the GA4GH specification. Current version is 0.1.7. Release cadence is low; the library is in early stable development.","status":"active","version":"0.1.7","language":"python","source_language":"en","source_url":"https://github.com/ga4gh/ga4gh-drs-client","tags":["drs","ga4gh","omics","data-repository-service","client"],"install":[{"cmd":"pip install ga4gh-drs-client","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"HTTP client for API calls","package":"requests","optional":false},{"reason":"Retry logic for transient failures","package":"retry","optional":false}],"imports":[{"note":"The package uses a nested module path; non-namespaced import fails.","wrong":"from drs_client import DRSClient","symbol":"DRSClient","correct":"from ga4gh.drs.client import DRSClient"},{"note":"","wrong":"","symbol":"DRSException","correct":"from ga4gh.drs.client import DRSException"}],"quickstart":{"code":"from ga4gh.drs.client import DRSClient\n\n# Initialize client (token can be passed via env var DRS_AUTH_TOKEN)\nclient = DRSClient(base_url='https://drs.example.com', auth_token=os.environ.get('DRS_AUTH_TOKEN', ''))\n\n# Access an object by its DRS ID\nobject_info = client.get_object('drs://example.org/object-id')\nprint(object_info['id'])\n\n# Download object bytes\ndata = client.get_object_bytes('drs://example.org/object-id')\nprint(f'Downloaded {len(data)} bytes')","lang":"python","description":"Connects to a DRS server, retrieves object metadata, and downloads its contents."},"warnings":[{"fix":"Prepend 'drs://' to your object ID if missing.","message":"DRS IDs should be passed as full DRS URIs (e.g., drs://hostname/object-id) not plain IDs.","severity":"gotcha","affected_versions":"all"},{"fix":"Set DRS_AUTH_TOKEN environment variable or pass token explicitly.","message":"The `auth_token` parameter must be set either in the constructor or via the DRS_AUTH_TOKEN environment variable; otherwise anonymous access is attempted.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `get_object_access(object_id, access_id)` instead.","message":"The `get_object_access_url()` method is deprecated in favor of `get_object_access()`.","severity":"deprecated","affected_versions":">=0.1.5"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install ga4gh-drs-client` in the target Python environment.","cause":"Package not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'ga4gh'"},{"fix":"Use `from ga4gh.drs.client import DRSClient`.","cause":"Trying to import from the wrong module; many users expect the package name to map directly.","error":"ImportError: cannot import name 'DRSClient' from 'drspy'"},{"fix":"Set the DRS_AUTH_TOKEN environment variable with a valid token, or pass `auth_token` to the constructor.","cause":"Missing or invalid authentication token.","error":"ga4gh.drs.client.exceptions.DRSException: Access denied"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}