Google I/O returns May 18-20! Reserve space and build your schedule Register now


Creates an instance of Struct from a Python container.

By default, this conversion is only performed at the top level for Python dictionaries, collections.OrderedDicts, namedtuples, lists, tuples, and attr.s classes. Elements of these structures are not recursively converted.

value The Python container to convert.
recursive Whether to convert elements recursively (False by default).

The corresponding instance of Struct.

TypeError If the value is not of one of the supported container types.