Unless noted otherwise, all method return values for Globus SDK Clients are GlobusResponse objects.

Some GlobusResponse objects are iterables. In those cases, their contents will also be GlobusResponse objects.

To customize client methods with additional detail, the SDK uses subclasses of GlobusResponse. For example the GlobusHTTPResponse attaches HTTP response information.

Generic Response Classes

class globus_sdk.response.GlobusResponse(data)[source]

Generic response object, with a single data member.

The most common response data is a JSON dictionary. To make handling this type of response as seemless as possible, the GlobusResponse object also supports direct dictionary item access, as an alias for accessing an item of the underlying data. If data is not a dictionary, item access will raise TypeError.

>>> print("Response ID": r["id"]) # alias for["id"]

Response data as a Python data structure. Usually a dict or list.

get(*args, **kwargs)[source]

GlobusResponse.get is just an alias for

class globus_sdk.response.GlobusHTTPResponse(http_response)[source]

Bases: globus_sdk.response.GlobusResponse

Response object that wraps an HTTP response from the underlying HTTP library. If the response is JSON, the parsed data will be available in data, otherwise data will be None and text should be used instead.

  • http_status – HTTP status code returned by the server (int)
  • content_type – Content-Type header returned by the server (str)

The raw response data as a string.

Service-Specific Response Classes