/usr/lib/python2.6/site-packages/boto/sqs
NameSizeModeActions
attributes.py17180644editdlrm
attributes.pyc12120644editdlrm
attributes.pyo12120644editdlrm
batchresults.py35150644editdlrm
batchresults.pyc33040644editdlrm
batchresults.pyo33040644editdlrm
bigmessage.py47290644editdlrm
bigmessage.pyc38980644editdlrm
bigmessage.pyo38980644editdlrm
connection.py215410644editdlrm
connection.pyc200400644editdlrm
connection.pyo200400644editdlrm
jsonmessage.py17550644editdlrm
jsonmessage.pyc12730644editdlrm
jsonmessage.pyo12730644editdlrm
message.py97870644editdlrm
message.pyc121290644editdlrm
message.pyo121290644editdlrm
messageattributes.py24870644editdlrm
messageattributes.pyc23620644editdlrm
messageattributes.pyo23620644editdlrm
queue.py177890644editdlrm
queue.pyc187910644editdlrm
queue.pyo187910644editdlrm
regioninfo.py15240644editdlrm
regioninfo.pyc7860644editdlrm
regioninfo.pyo7860644editdlrm
__init__.py17050644editdlrm
__init__.pyc10160644editdlrm
__init__.pyo10160644editdlrm
Edit: /usr/lib/python2.6/site-packages/boto/sqs/bigmessage.pyc (3898B)
Ñò Å-õSc@sRddkZddkZddklZddklZdefd„ƒYZdS(iÿÿÿÿN(t RawMessage(tSQSDecodeErrort BigMessagecBsMeZdZdddd„Zd„Zd„Zd„Zd„Zd„Z RS(s± The BigMessage class provides large payloads (up to 5GB) by storing the payload itself in S3 and then placing a reference to the S3 object in the actual SQS message payload. To create a BigMessage, you should create a BigMessage object and pass in a file-like object as the ``body`` param and also pass in the an S3 URL specifying the bucket in which to store the message body:: import boto.sqs from boto.sqs.bigmessage import BigMessage sqs = boto.sqs.connect_to_region('us-west-2') queue = sqs.get_queue('myqueue') fp = open('/path/to/bigmessage/data') msg = BigMessage(queue, fp, 's3://mybucket') queue.write(msg) Passing in a fully-qualified S3 URL (e.g. s3://mybucket/foo) is interpreted to mean that the body of the message is already stored in S3 and the that S3 URL is then used directly with no content uploaded by BigMessage. cCs&||_tt|ƒi||ƒdS(N(ts3_urltsuperRt__init__(tselftqueuetbodyR((s7/usr/lib/python2.6/site-packages/boto/sqs/bigmessage.pyR8s cCs˜d}}|o}|idƒoT|diddƒ}|d}t|ƒdjo|do|d}qqqŠqŽd}t||ƒ‚n||fS(Nss3://it/iis(s3_url parameter should start with s3://(tNonet startswithtsplittlenR(RRt bucket_nametkey_namet s3_componentstmsg((s7/usr/lib/python2.6/site-packages/boto/sqs/bigmessage.pyt_get_bucket_key<s   cCs‹|i|iƒ\}}|o|o|iStiƒ}tiƒ}|i|ƒ}|i|ƒ}|i|ƒd||f|_|iS(s  :type value: file-like object :param value: A file-like object containing the content of the message. The actual content will be stored in S3 and a link to the S3 object will be stored in the message body. s s3://%s/%s( RRtuuidtuuid4tbotot connect_s3t get_buckettnew_keytset_contents_from_file(RtvalueRRts3_connt s3_buckettkey((s7/usr/lib/python2.6/site-packages/boto/sqs/bigmessage.pytencodeNs   cCso|i|ƒ\}}|o6|o/tiƒ}|i|ƒ}|i|ƒ}|Sd|}t||ƒ‚dS(NsUnable to decode S3 URL: %s(RRRRtget_keyR(RRRRRRRR((s7/usr/lib/python2.6/site-packages/boto/sqs/bigmessage.pyt_get_s3_objectas  cCs"||_|i|ƒ}|iƒS(N(RR tget_contents_as_string(RRR((s7/usr/lib/python2.6/site-packages/boto/sqs/bigmessage.pytdecodels cCsA|io |i|iƒ}|iƒntt|ƒiƒdS(N(RR tdeleteRR(RR((s7/usr/lib/python2.6/site-packages/boto/sqs/bigmessage.pyR#qs N( t__name__t __module__t__doc__R RRRR R"R#(((s7/usr/lib/python2.6/site-packages/boto/sqs/bigmessage.pyRs   (RRtboto.sqs.messageRtboto.exceptionRR(((s7/usr/lib/python2.6/site-packages/boto/sqs/bigmessage.pyts