Skip to main content

Python SDK/Library for IAP

Project description

libiap

Python SDK/Library for IAP -- https://umccr-illumina.github.io/libiap/

TL;DR

  • Install through pip like 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:
from libiap import libgds

for file in libgds.list_files(volume_name='my-gds-volume-name'):
    print(file)
  • Using OpenAPI:
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)

Development

  • Pilot run or Integration Test:
export IAP_BASE_URL=<baseUrl>
export IAP_AUTH_TOKEN=<tok>
python pilot.py

License

MIT License and DISCLAIMER

License: MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libiap-0.2.0.tar.gz (186.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libiap-0.2.0-py3-none-any.whl (477.3 kB view details)

Uploaded Python 3

File details

Details for the file libiap-0.2.0.tar.gz.

File metadata

  • Download URL: libiap-0.2.0.tar.gz
  • Upload date:
  • Size: 186.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for libiap-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b98380fb8efd658f324ca25ba77f2dfd61dab3dbc9b7d1269c52e2d8622d4321
MD5 5fdb7e64c5aed393519d518fd1dd267b
BLAKE2b-256 f6f77f9c9970c4f5617e4504455915e32f094853c70bbedb7257dad28506e0a3

See more details on using hashes here.

File details

Details for the file libiap-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: libiap-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 477.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for libiap-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c23aa308cb088885cafd39e5315a5e3cdbf3851d6609fa34f233b98663380840
MD5 a21bfbb36a0d5dc971803135c6dee083
BLAKE2b-256 e9f96f4eb5f170f860fe5b7e836f2bfa012ca0d5e0260856fa08490774fa1ea3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page