Bravado生成的模拟GA4GH DRS客户端
drs-client的Python项目详细描述
DRS客户端
此存储库包含一个基于Bravado的客户端,用于 Global Alliance for Genomics and Health的Data Repository Serviceapi模式,如mock-DRS存储库中所述。客户已开发 用于TEStribute任务分布逻辑应用程序。
用法
在之后的python代码中使用客户端导入 installation:
importdrs_clientclient=drs_client.Client("http://localhost:9101/ga4gh/drs/v1/")
Note that the indicated URL is valid when mock-DRS was installed at the default location on your local machine. When a different DRS instance is supposed to be used, replace the full URL (including
http://
orhttps://
).
使用例如:
访问mock-DRSGET /objects/{object_id}
端点
response=client.GetObject("a001")
使用例如:
访问mock-DRSPOST /update-db
端点
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",},],)
objects列表可以包含任意数量的drs\u object dict和clear\u db 指示在上载指定的 物体。
有关通过POST /update-db
端点填充drs的更多详细信息,
请参阅mock-DRS存储库中的文档。
请注意,当前未实现所有其他终结点。
安装
您可以通过以下两种方式之一安装DRS-cli
:
手动安装
git clone https://github.com/elixir-europe/DRS-cli.git
cd DRS-cli
python setup.py install
通过包管理器安装
pip install -e git+https://github.com/elixir-europe/DRS-cli.git#egg=drs_client
或
pip install drs_client
贡献
这个项目是一个社区的努力,靠你的贡献为生 错误报告、功能请求、讨论、修复和其他代码的形式 变化。如果你想投稿,请阅读contributing guidelines。 请注意code of conduct与社区的所有交互。
版本控制
应用程序的开发目前仍处于alpha阶段,并且正在进行版本控制 仅供内部使用。在将来,我们的目标是采用与TEStribute的版本控制同步的semantic versioning,并且 [mock tes]以确保这些应用程序与 他们的主要版本和次要版本相匹配。
许可证
这个项目由Apache License 2.0也可用的shipped with this repository所覆盖。
联系人
请联系project leader获取 不包括在 Contributing部分。
致谢
该项目是在ELIXIR Cloud and AAI小组的保护下进行的一项合作。它是在2019 Google Summer of Code期间作为一部分启动的 属于Global Alliance for Genomics and Healthorganization。