Registry / http-networking / ga4gh-drs-client

ga4gh-drs-client

JSON →
library0.1.7pypypiunverified

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.

pip install ga4gh-drs-client
INSTALL
IMPORT
SIG · GA4GH-DRS-CLIENT
G
ga4gh-drs-client
http-networkingpythonv0.1.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DRSClient
from ga4gh.drs.client import DRSClient
from ga4gh.drs.client import DRSClient

Connects to a DRS server, retrieves object metadata, and downloads its contents.

from ga4gh.drs.client import DRSClient # Initialize client (token can be passed via env var DRS_AUTH_TOKEN) client = DRSClient(base_url='https://drs.example.com', auth_token=os.environ.get('DRS_AUTH_TOKEN', '')) # Access an object by its DRS ID object_info = client.get_object('drs://example.org/object-id') print(object_info['id']) # Download object bytes data = client.get_object_bytes('drs://example.org/object-id') print(f'Downloaded {len(data)} bytes')
ga4gh-drs-client --version
Debug
Known issues
gotchaDRS IDs should be passed as full DRS URIs (e.g., drs://hostname/object-id) not plain IDs.
fix
Prepend 'drs://' to your object ID if missing.
affects: all
gotchaThe `auth_token` parameter must be set either in the constructor or via the DRS_AUTH_TOKEN environment variable; otherwise anonymous access is attempted.
fix
Set DRS_AUTH_TOKEN environment variable or pass token explicitly.
affects: all
deprecatedThe `get_object_access_url()` method is deprecated in favor of `get_object_access()`.
fix
Use `get_object_access(object_id, access_id)` instead.
affects: >=0.1.5
Upgrade
Version history
0.1.7latest on PyPI · released Oct 9, 2019
Audit
Dependencies
requestsrequiredHTTP client for API calls
retryrequiredRetry logic for transient failures
Agent activity
10 hits · last 30 days
node
8
Resources
ga4gh-drs-client — pip install ga4gh-drs-client · libregistry