Python SDK/Library for IAP
Project description
libiap
Python SDK/Library for IAP -- https://umccr-illumina.github.io/libiap/
- Tested for Python 3.6, 3.7, 3.8
- Test Coverage
TL;DR
- Install through
piplike so:
pip install libiap
- Export IAP base URL and auth token:
export IAP_BASE_URL=<baseUrl>
export IAP_AUTH_TOKEN=<tok>
- Somewhere in your Python code:
import os
from libiap.openapi import libwes
from libiap.openapi.libwes import WorkflowList, WorkflowCompact
iap_auth_token = os.getenv("IAP_AUTH_TOKEN")
iap_base_url = os.getenv("IAP_BASE_URL")
configuration = libwes.Configuration(
host=iap_base_url,
api_key={
'Authorization': iap_auth_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:
Alpha Modules Deprecation Note
🙋♂️ For those who just get started using
libiap, please use auto-generated OpenAPI modules underlibiap.openapipackage (e.g.libiap.openapi.libwes, ...) for better upstream support.
- Those alpha modules directly under top level package (e.g.
libiap.libwes, ...) may be deprecated in near future releases. - These alpha modules are there for some backward compatible and graceful migration support purpose only.
- Start from release
0.4.0, you will get deprecation warning when you attempt to import or use these alpha modules.
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
Makefileworkflow
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file libiap-0.4.0.tar.gz.
File metadata
- Download URL: libiap-0.4.0.tar.gz
- Upload date:
- Size: 201.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b416c4fba8cb1c478a2991feca23bbe6785a10aa0637f43482a68cd74b148f75
|
|
| MD5 |
8eeac8c6bb9556b068b321a07d6745b0
|
|
| BLAKE2b-256 |
cb38871ffdb6cad85a69831240366eefd707be8667f670e6de75699378f6e65a
|
File details
Details for the file libiap-0.4.0-py3-none-any.whl.
File metadata
- Download URL: libiap-0.4.0-py3-none-any.whl
- Upload date:
- Size: 520.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0e8abf88988a6e229998139279f8a3e7f5cd0ed32e3c909bbc054d299c92d80
|
|
| MD5 |
046af417497f1f8541595e9beaaf72fd
|
|
| BLAKE2b-256 |
8003cf4336a3197ac913fd37aa465651f6b987fc3e1a7601d9cf4da2e51ac9b4
|