Skip to main content

TES-cli

Apache License GitHub: latest tag PyPI PyPI

This repository contains a Bravado-based client for a modified version of the Task Execution Service API schema of the Global Alliance for Genomics and Health, as described in the mock-TES repository. The client was developed for the use within the TEStribute task distribution logic application.

Usage

To use the client import it as follows in your Python code after installation:

import tes_client

client = tes_client.Client("http://localhost:9001/ga4gh/tes/v1/")

It is possible to supply a Bearer token, which will then be added to the Authentication header (prepended by Bearer) for every outbound call:

client = tes_client.Client(
   url="https://path.to/swagger.json",
   jwt="SomET0kEn"
)

Note that the indicated URL is valid when mock-TES was installed at the default location on your local machine. When a different TES instance is supposed to be used, replace the full URL (including http:// or https://).

Access the mock-TES POST /tasks/task-info endpoint with, e.g.:

response = client.getTaskInfo(
    cpu_cores=4,
    ram_gb=8,
    disk_gb=100,
    execution_time_min=10,
)

Access the mock-TES POST /update-config endpoint with, e.g.:

response = client.updateTaskInfoConfig(
    currency="USD",
    time_unit="MINUTES",
    unit_costs={
        "cpu_usage": 1,
        "memory_consumption": 4,
        "data_storage": 10,
        "data_transfer": 20,
    },
)

Note that the original TES endpoints are currently not implemented.

Installation

You can install TES-cli in one of two ways:

Manual installation

git clone https://github.com/elixir-europe/TES-cli.git
cd TES-cli
python setup.py install

Installation via package manager

pip install drs_client

or (for development version)

pip install -e git+https://github.com/elixir-europe/TES-cli.git#egg=tes_client

Contributing

This 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 the contributing guidelines if you want to contribute. And please mind the code of conduct for all interactions with the community.

Versioning

Development of the app is currently still in alpha stage, and current versioning is for internal use only. In the future, we are aiming to adopt semantic versioning that is synchronized to the versioning of TEStribute and mock-TES in order to ensure that these apps will be compatible as long as both their major and minor versions match.

License

This project is covered by the Apache License 2.0 also available shipped with this repository.

Contact

Please contact the project leader for inquiries, proposals, questions etc. that are not covered by the Contributing section.

Acknowledgments

The project is a collaborative effort under the umbrella of the ELIXIR Cloud and AAI group. It was started during the 2019 Google Summer of Code as part of the Global Alliance for Genomics and Health organization.

logo banner

Metadata

Release files for tes-client 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tes-client 0.2.1
File Size Uploaded Provenance Actions
tes_client-0.2.1.tar.gz 11.3 kB Without provenance Details for tes_client-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tes-client 0.2.1
File Interpreter ABI Platform Actions
tes_client-0.2.1-py3-none-any.whl Python 3 none any Details for tes_client-0.2.1-py3-none-any.whl

Total release size: 19.7 kB

Release files / tes_client-0.2.1.tar.gz

Download URL tes_client-0.2.1.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9443ac1c86f7e456032096398b328e8f55be1e931110d141be18937115bab167
BLAKE2b-256 checksum
How to use checksums
aa4537496b869fcc1a7255e5f7c058a7c9d60b7800b342c82d7ee8f1a017d169
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Release files / tes_client-0.2.1-py3-none-any.whl

Download URL tes_client-0.2.1-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dca4d7653f7a15478fa890fdf30f549ce9a435352c09c89132eacabaab987549
BLAKE2b-256 checksum
How to use checksums
bff1a79c9c698387a57e789b190529d212d799d0a99d42407826ec945a094e19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

Security for tes-client 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page