@classmethod<EOL><INDENT>def from_description(cls, table):<DEDENT>
throughput = table.provisioned_throughput<EOL>attrs = {}<EOL>for data in getattr(table, "<STR_LIT>", []):<EOL><INDENT>field = TableField(data["<STR_LIT>"], TYPES_REV[data["<STR_LIT>"]])<EOL>attrs[field.name] = field<EOL><DEDENT>for data in getattr(table, "<STR_LIT>", []):<EOL><INDENT>name = data["<STR_LIT>"]<EOL>attrs[name].key_type = data["<STR_LIT>"]<EOL><DEDENT>for index in getattr(table, "<STR_LIT>", []):<EOL><INDENT>for data in index["<STR_LIT>"]:<EOL><INDENT>if data["<STR_LIT>"] == "<STR_LIT>":<EOL><INDENT>name = data["<STR_LIT>"]<EOL>index_type = index["<STR_LIT>"]["<STR_LIT>"]<EOL>includes = index["<STR_LIT>"].get("<STR_LIT>")<EOL>attrs[name] = attrs[name].to_index(<EOL>index_type, index["<STR_LIT>"], includes<EOL>)<EOL>break<EOL><DEDENT><DEDENT><DEDENT>global_indexes = {}<EOL>for index in getattr(table, "<STR_LIT>", []):<EOL><INDENT>idx = GlobalIndex.from_description(index, attrs)<EOL>global_indexes[idx.name] = idx<EOL><DEDENT>return cls(<EOL>table,<EOL>attrs,<EOL>global_indexes,<EOL>throughput["<STR_LIT>"],<EOL>throughput["<STR_LIT>"],<EOL>throughput["<STR_LIT>"],<EOL>table.table_size_bytes,<EOL>)<EOL>
Factory method that uses the dynamo3 'describe' return value