Python SDK for Illumina Connected Analytics
Project description
libica
Python SDK to programmatically call Illumina Connected Analytics (ICA) BioInformatics web services i.e. SDK for API https://ica-docs.readme.io/reference
- Workflow Execution Service (WES)
- Task Execution Service (TES)
- Genomic Data Store (GDS)
- Developer Console Service (DCS)
- Event Notification Service (ENS)
Overview:
- https://umccr-illumina.github.io/libica/
- Tested for Python 3.6, 3.7, 3.8, 3.9
- Test Coverage
TL;DR
- Install through
pip
like so:
pip install libica
- Export ICA base URL and JWT Bearer token:
export ICA_BASE_URL=<baseUrl>
export ICA_ACCESS_TOKEN=<tok>
- Generate Bearer JWT token using ICA CLI like so:
ica tokens create --help
- Somewhere in your Python code:
import os
from libica.openapi import libwes
from libica.openapi.libwes import WorkflowList, WorkflowCompact
ica_base_url = os.getenv("ICA_BASE_URL")
ica_access_token = os.getenv("ICA_ACCESS_TOKEN")
configuration = libwes.Configuration(
host=ica_base_url,
api_key={
'Authorization': ica_access_token
},
api_key_prefix={
'Authorization': "Bearer"
},
)
with libwes.ApiClient(configuration) as api_client:
wfl_api: libwes.WorkflowsApi = libwes.WorkflowsApi(api_client)
try:
page_token = None
while True:
wfl_list: WorkflowList = wfl_api.list_workflows(page_size=100, page_token=page_token)
# print(wfl_list)
for item in wfl_list.items:
wfl: WorkflowCompact = item
print(wfl.id)
print(wfl.name)
page_token = wfl_list.next_page_token
if not wfl_list.next_page_token:
break
except libwes.ApiException as e:
print(e)
More examples available at:
Development
-
Setup virtual environment and activate it
-
Install dependencies
make install
- To run unit tests suite
make unit
make autounit
- To bring up mock API μ-services
make up
- To run integration tests suite (required services fully up)
make it
- To run full test suite (required services fully up)
make test
- Most of the dev pipelines are in
Makefile
workflow
License
MIT License and DISCLAIMER
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
libica-0.5.0rc2.tar.gz
(200.5 kB
view hashes)
Built Distribution
libica-0.5.0rc2-py3-none-any.whl
(530.2 kB
view hashes)
Close
Hashes for libica-0.5.0rc2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52443810e7b1e959adfcb04602732f4910dc4ab21c544218a42a7922a0ab2972 |
|
MD5 | eb27ffa67e31c4a09737957ba8e84c65 |
|
BLAKE2b-256 | 4b74905ae4b69870bd1fce98fd0206952093fa4a64501f04a2c8cc9cee7d76ce |