tesk.api.ga4gh.tes package

Subpackages

Submodules

tesk.api.ga4gh.tes.controllers module

Controllers for GA4GH TES API endpoints.

tesk.api.ga4gh.tes.controllers.CancelTask(id, *args, **kwargs)[source]

Cancel unfinished task.

Parameters:
  • id – Task identifier.

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

Return type:

dict

tesk.api.ga4gh.tes.controllers.CreateTask(*args, **kwargs)[source]

Create task.

Parameters:
  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

Return type:

dict

tesk.api.ga4gh.tes.controllers.GetServiceInfo()[source]

Get service info.

Return type:

dict

tesk.api.ga4gh.tes.controllers.GetTask(*args, **kwargs)[source]

Get info for individual task.

Parameters:
  • id – Task identifier.

  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

Return type:

dict

tesk.api.ga4gh.tes.controllers.ListTasks(*args, **kwargs)[source]

List all available tasks.

Parameters:
  • *args – Variable length argument list.

  • **kwargs – Arbitrary keyword arguments.

Return type:

dict

tesk.api.ga4gh.tes.models module

Models for TES API.

class tesk.api.ga4gh.tes.models.Artifact(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Artifact type.

tes = 'tes'
class tesk.api.ga4gh.tes.models.Organization(**data)[source]

Bases: BaseModel

Organization responsible for a GA4GH service.

name: str
url: AnyUrl
class tesk.api.ga4gh.tes.models.Service(**data)[source]

Bases: BaseModel

GA4GH service.

contactUrl: Optional[str]
createdAt: Optional[datetime]
description: Optional[str]
documentationUrl: Optional[AnyUrl]
environment: Optional[str]
id: str
name: str
organization: Organization
type: ServiceType
updatedAt: Optional[datetime]
version: str
class tesk.api.ga4gh.tes.models.ServiceType(**data)[source]

Bases: BaseModel

Type of a GA4GH service.

artifact: str
group: str
version: str
class tesk.api.ga4gh.tes.models.TesCancelTaskResponse(**data)[source]

Bases: BaseModel

CancelTaskResponse describes a response from the CancelTask endpoint.

class tesk.api.ga4gh.tes.models.TesCreateTaskResponse(**data)[source]

Bases: BaseModel

CreateTaskResponse describes a response from the CreateTask endpoint.

It will include the task ID that can be used to look up the status of the job.

id: str
class tesk.api.ga4gh.tes.models.TesExecutor(**data)[source]

Bases: BaseModel

An executor is a command to be run in a container.

command: List[str]
env: Optional[Dict[str, str]]
ignore_error: Optional[bool]
image: str
stderr: Optional[str]
stdin: Optional[str]
stdout: Optional[str]
workdir: Optional[str]
class tesk.api.ga4gh.tes.models.TesExecutorLog(**data)[source]

Bases: BaseModel

ExecutorLog describes logging information related to an Executor.

end_time: Optional[str]
exit_code: int
start_time: Optional[str]
stderr: Optional[str]
stdout: Optional[str]
class tesk.api.ga4gh.tes.models.TesFileType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Define if input/output element is a file or a directory.

It is not required that the user provide this value, but it is required that the server fill in the value once the information is available at run time.

DIRECTORY = 'DIRECTORY'
FILE = 'FILE'
class tesk.api.ga4gh.tes.models.TesInput(**data)[source]

Bases: BaseModel

Input describes Task input files.

content: Optional[str]
description: Optional[str]
name: Optional[str]
path: str
streamable: Optional[bool]
type: Optional[TesFileType]
url: Optional[str]
class tesk.api.ga4gh.tes.models.TesListTasksResponse(**data)[source]

Bases: BaseModel

ListTasksResponse describes a response from the ListTasks endpoint.

next_page_token: Optional[str]
tasks: List[TesTask]
class tesk.api.ga4gh.tes.models.TesOutput(**data)[source]

Bases: BaseModel

Output describes Task output files.

description: Optional[str]
name: Optional[str]
path: str
path_prefix: Optional[str]
type: Optional[TesFileType]
url: str
class tesk.api.ga4gh.tes.models.TesOutputFileLog(**data)[source]

Bases: BaseModel

OutputFileLog describes a single output file.

This describes file details after the task has completed successfully, for logging purposes.

path: str
size_bytes: str
url: str
class tesk.api.ga4gh.tes.models.TesResources(**data)[source]

Bases: BaseModel

Resources describes the resources requested by a task.

backend_parameters: Optional[Dict[str, str]]
backend_parameters_strict: Optional[bool]
cpu_cores: Optional[int]
disk_gb: Optional[float]
preemptible: Optional[bool]
ram_gb: Optional[float]
zones: Optional[List[str]]
class tesk.api.ga4gh.tes.models.TesServiceInfo(**data)[source]

Bases: Service

ServiceInfo describes the service that is running the TES API.

storage: Optional[List[str]]
tesResources_backend_parameters: Optional[List[str]]
type: Optional[TesServiceType]
class tesk.api.ga4gh.tes.models.TesServiceType(**data)[source]

Bases: ServiceType

Type of a TES service.

artifact: Artifact
class tesk.api.ga4gh.tes.models.TesState(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Task state.

CANCELED = 'CANCELED'
CANCELING = 'CANCELING'
COMPLETE = 'COMPLETE'
EXECUTOR_ERROR = 'EXECUTOR_ERROR'
INITIALIZING = 'INITIALIZING'
PAUSED = 'PAUSED'
PREEMPTED = 'PREEMPTED'
QUEUED = 'QUEUED'
RUNNING = 'RUNNING'
SYSTEM_ERROR = 'SYSTEM_ERROR'
UNKNOWN = 'UNKNOWN'
class tesk.api.ga4gh.tes.models.TesTask(**data)[source]

Bases: BaseModel

Task describes a task to be run.

creation_time: Optional[str]
description: Optional[str]
executors: List[TesExecutor]
id: Optional[str]
inputs: Optional[List[TesInput]]
logs: Optional[List[TesTaskLog]]
name: Optional[str]
outputs: Optional[List[TesOutput]]
resources: Optional[TesResources]
state: Optional[TesState]
tags: Optional[Dict[str, str]]
volumes: Optional[List[str]]
class tesk.api.ga4gh.tes.models.TesTaskLog(**data)[source]

Bases: BaseModel

TaskLog describes logging information related to a Task.

end_time: Optional[str]
logs: List[TesExecutorLog]
metadata: Optional[Dict[str, str]]
outputs: List[TesOutputFileLog]
start_time: Optional[str]
system_logs: Optional[List[str]]

Module contents

TESK API GA4GH TES package.