Skip to content

aero_client

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

config

DSaaS client config module.

ClientConf

Configuration for the AERO client.

client_uuid class-attribute instance-attribute

client_uuid: str = 'c78511ef-8cf7-4802-a7e1-7d56e27b1bf8'

...

error

DSaaS Client error definition module

ClientError

ClientError(*args: object, **kwargs)

Bases: Exception

Error for the AERO client.

jobs

AERO flow compute function definition.

commit_analysis()

commit_analysis(*arglist) -> dict

Commit metadata of analysis function to database.

RETURNS DESCRIPTION
dict

Response from database update.

TYPE: dict

database_commit()

database_commit(
    *args, **kwargs
) -> dict[str, int | float | str | dict]

Commit ingested metadata to database

RETURNS DESCRIPTION
dict

Response dictionary returned by user function with optional metrics appended.

TYPE: dict[str, int | float | str | dict]

download()

download(*args, **kwargs) -> tuple[str, str]

Download data from user-specified repository.

RETURNS DESCRIPTION
tuple[str, str]

tuple[str, str]: Path to the data and its associated extension.

get_versions()

get_versions(*function_params) -> dict

Get the desired version of the source data.

RETURNS DESCRIPTION
dict

Function parameters to send to user-defined analysis function.

TYPE: dict

utils

DSaaS client util module

PolicyEnum

Bases: IntEnum

Enum for the types of policies supported by AERO.

ALL class-attribute instance-attribute

ALL = 3

...

ANY class-attribute instance-attribute

ANY = 2

...

INGESTION class-attribute instance-attribute

INGESTION = 0

Data ingestion policy.

NONE class-attribute instance-attribute

NONE = -1

No policy.

TIMER class-attribute instance-attribute

TIMER = 1

Timer-based policy.

aero_format()

aero_format(fn: callable)

AERO decorator that wraps user analysis function to capture provenance information.

authenticate()

authenticate(client: NativeAppAuthClient, scope: str)

Perform Globus Authentication.

download()

download(*args, **kwargs)

Download data from user-specified repository.

RETURNS DESCRIPTION

tuple[str, str]: Path to the data and its associated extension.

get_transfer_token()

get_transfer_token(collection_uuid: str) -> str

Get the transfer token belonging to the Globus Guest Collection.

This function first verifies whether the token already exists. If it does not, it generates the tokens and updates the token file.

PARAMETER DESCRIPTION
collection_uuid

The UUID of the Globus Guest Collection.

TYPE: str

RETURNS DESCRIPTION
str

The transfer token for the guest collection

TYPE: str

register_function()

register_function(fn: callable)

Registers function with Globus Compute by registering the function with the wrapper