Package: drs-client
DRS-cliThis repository contains aBravado-based client for a mockup implementation of
theData Repository ServiceAPI schema of theGlobal Alliance for Genomics
and Health, as described in themock-DRSrepository. The client was developed
for the use within theTEStributetask distribution logic application.UsageTo use the client import it as follows in your Python code afterinstallation:importdrs_clientclient=drs_client.Client("http://localhost:9101/ga4gh/drs/v1/")It is possible to supply a Bearer token, which will then be added to theAuthenticationheader (prepended byBearer) for every outbound call:client=tes_client.Client(url="https://path.to/swagger.json",jwt="SomET0kEn")Note that the indicated URL is valid whenmock-DRSwas installed at the
default location on your local machine. When a different DRS instance is
supposed to be used, replace the full URL (includinghttp://orhttps://).Access themock-DRSGET /objects/{object_id}endpoint with, e.g.:response=client.GetObject("a001")Access themock-DRSPOST /update-dbendpoint with, e.g.:response=client.updateDatabaseObjects(clear_db=True,objects=[{"access_methods":[{"access_id":"string","access_url":{"headers":["Authorization"],"url":"string"},"region":"us-east-1","type":"s3",}],"aliases":["string"],"checksums":[{"checksum":"string","type":"string"}],"created":"string","description":"string","id":"string","mime_type":"application/json","name":"string","size":0,"updated":"string","version":"string",},],)the objects list can contain any number of such drs_object dicts and the clear_db
indicates weather or not the db should be emptied before upload of specified
objects.For further details on populating the DRS via thePOST /update-dbendpoint,
please see the documentation in themock-DRSrepository.Note that all other endpoints are currently not implemented.InstallationYou can installDRS-cliin one of two ways:Manual installationgitclonehttps://github.com/elixir-europe/DRS-cli.gitcdDRS-cli
pythonsetup.pyinstallInstallation via package managerpipinstall-egit+https://github.com/elixir-europe/DRS-cli.git#egg=drs_clientorpipinstalldrs_clientContributingThis project is a community effort and lives off your contributions, be it in
the form of bug reports, feature requests, discussions, or fixes and other code
changes. Please read thecontributing guidelinesif you want to contribute.
And please mind thecode of conductfor all interactions with the community.VersioningDevelopment of the app is currently still in alpha stage, and current versioning
is for internal use only. In the future, we are aiming to adoptsemantic
versioningthat is synchronized to the versioning ofTEStributeand
[mock-TES] in order to ensure that these apps will be compatible as long as both
their major and minor versions match.LicenseThis project is covered by theApache License 2.0also availableshipped
with this repository.ContactPlease contact theproject leaderfor
inquiries, proposals, questions etc. that are not covered by theContributingsection.AcknowledgmentsThe project is a collaborative effort under the umbrella of theELIXIR Cloud
and AAIgroup. It was started during the2019 Google Summer of Codeas part
of theGlobal Alliance for Genomics and Healthorganization.