o ckF[]ã@s,dZddlmZddlZGdd„deƒZdS)z´ This module was contributed by Chris Moyer. It provides a subclass of the SQS Message class that supports YAML as the body of the message. This module requires the yaml module. é)ÚMessageNcs2eZdZdZd ‡fdd„ Zdd„Zdd „Z‡ZS) Ú YAMLMessagezû The YAMLMessage class provides a YAML compatible message. Encoding and decoding are handled automaticaly. Access this message data like such: m.data = [ 1, 2, 3] m.data[0] # Returns 1 This depends on the PyYAML package NÚcsd|_tt|ƒ ||¡dS©N)ÚdataÚsuperrÚ__init__)ÚselfÚqueueÚbodyÚ xml_attrs©Ú __class__©ú9/usr/lib/python3/dist-packages/boto/contrib/ymlmessage.pyr-szYAMLMessage.__init__cCst |¡|_dSr)ÚyamlÚ safe_loadr)r r rrrÚset_body1szYAMLMessage.set_bodycCs t |j¡Sr)rÚdumpr)r rrrÚget_body4s zYAMLMessage.get_body)NrN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrÚ __classcell__rrr rr s  r)rÚboto.sqs.messagerrrrrrrÚs