Stay organized with collections Save and categorize content based on your preferences.

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.