Skip to content

api

DSaaS client API module

get_flow()

get_flow(flow_id: str, inputs_only: bool = True) -> dict

Get metadata on the flow provided a flow ID.

PARAMETER DESCRIPTION
flow_id

The flow UUID

TYPE: str

inputs_only

Whether to return flow input data exclusively. Defaults to True.

TYPE: bool DEFAULT: True

RETURNS DESCRIPTION
dict

Flow metadata in dictionary representation.

TYPE: dict

globus_logout()

globus_logout()

Remove the Globus Auth token file to invoke login on next API access.

list_metadata()

list_metadata(
    metadata_type: Literal["data", "prov", "flow"],
) -> Generator[JSON, JSON, JSON]

Get the metadata records.

PARAMETER DESCRIPTION
metadata_type

List metadata of a certain type.

TYPE: Literal['data', 'prov', 'flow']

RETURNS DESCRIPTION
JSON

Generation[JSON]: a generator returning up to 15 metadata records at a time.

register_flow()

register_flow(
    endpoint_uuid: str,
    function_uuid: str,
    input_data: dict[str | dict[str | int | None]] = {},
    output_data: dict[str | dict[str, str]] = {},
    kwargs: JSON = {},
    config: str | None = None,
    description: str | None = None,
    policy: PolicyEnum = PolicyEnum.NONE,
    timer_delay: int | None = None,
    pull_function_uuid: str | None = None,
    commit_function_uuid: str | None = None,
) -> None

Register user function to run as a Globus Flow on remote server periodically.

PARAMETER DESCRIPTION
endpoint_uuid

Globus Compute endpoint uuid

TYPE: str

function_uuid

Globus Compute registered function UUID

TYPE: str

input_data

The input data, presented in the format {"name": {"id": , "version": }}. Default is None.

TYPE: (dict[str | dict[str, uuid | int]], optional) DEFAULT: {}

output_data

The output data that will be created, presented in the format {"name": {"url": }}. Default is None.

TYPE: dict[str | dict[str, str]] DEFAULT: {}

kwargs

Keyword arguments to pass to function. Default is None

TYPE: JSON DEFAULT: {}

config

Path to config file. Default is None.

TYPE: str DEFAULT: None

description

A description of the Flow. Default is None.

TYPE: str | None DEFAULT: None

policy

Which policy to use to rerun the flow. Default is never rerun.

TYPE: PolicyEnum DEFAULT: NONE

timer_delay

The timer delay in seconds if PolicyEnum.TIMER is applied. Default is None.

TYPE: int | None DEFAULT: None

pull_function_uuid

the uuid returned when registering either aero_client.jobs.download or aero_client.jobs.get_versions with Globus Compute. The function will register with GC if not provided, but issues may arise if local python version does not match endpoint python version. default is none.

TYPE: str | none DEFAULT: None

commit_function_uuid

the uuid returned when registering either aero_client.jobs.database_commit or aero_client.jobs.commit_analysis with Globus Compute. The function will register with GC if not provided, but issues may arise if local python version does not match endpoint python version. default is none.

TYPE: str | none DEFAULT: None

RAISES DESCRIPTION
ClientError

if function was not able to be registered as a flow, this error is raised

RETURNS DESCRIPTION
str

the timer job uuid.

TYPE: None

register_function()

register_function(func: Callable)

Register function to a Globus Compute Client.

search_sources()

search_sources(query: str) -> list[dict[str, str | int]]

Get the sources that match the query

PARAMETER DESCRIPTION
query

a Globus Search query string

TYPE: str

RETURNS DESCRIPTION
list[dict[str, str | int]]

list[dict[str, str | int]]: list of sources matching the query