#NEWLINE# @ classmethod #NEWLINE# def from_key( cls , container , key ) : #NEWLINE# #INDENT# 'Create from key object.' #NEWLINE# if ( key is None ) : #NEWLINE# #INDENT# raise errors . NoObjectException #NEWLINE# #UNINDENT# return cls ( container , name = key . name , size = key . size , content_type = key . content_type , content_encoding = key . content_encoding , last_modified = dt_from_header ( key . last_modified ) , obj_type = cls . type_cls . FILE )