Utilities

Warning

The components in this module are not intended for outside use, but are internal to the Globus SDK.

They may change in backwards-incompatible ways in minor or patch releases of the SDK.

This documentation is included here for completeness.

PayloadWrapper

The PayloadWrapper class is used as a base class for all Globus SDK payload datatypes to provide nicer interfaces for payload construction.

The objects are a type of UserDict with no special methods.

class globus_sdk.utils.PayloadWrapper(dict=None, /, **kwargs)[source]

A class for defining helper objects which wrap some kind of “payload” dict. Typical for helper objects which formulate a request payload, e.g. as JSON.

Payload types inheriting from this class can be passed directly to the client post(), put(), and patch() methods instead of a dict. These methods will recognize a PayloadWrapper and convert it to a dict for serialization with the requested encoder (e.g. as a JSON request body).