/usr/lib/python2.6/site-packages/boto/s3
NameSizeModeActions
acl.py57270644editdlrm
acl.pyc60930644editdlrm
acl.pyo60930644editdlrm
bucket.py793690644editdlrm
bucket.pyc707340644editdlrm
bucket.pyo706880644editdlrm
bucketlistresultset.py67960644editdlrm
bucketlistresultset.pyc57470644editdlrm
bucketlistresultset.pyo57470644editdlrm
bucketlogging.py31830644editdlrm
bucketlogging.pyc29060644editdlrm
bucketlogging.pyo29060644editdlrm
connection.py261920644editdlrm
connection.pyc237440644editdlrm
connection.pyo236070644editdlrm
cors.py89410644editdlrm
cors.pyc80180644editdlrm
cors.pyo80180644editdlrm
deletemarker.py20870644editdlrm
deletemarker.pyc15010644editdlrm
deletemarker.pyo15010644editdlrm
key.py823190644editdlrm
key.pyc660280644editdlrm
key.pyo660280644editdlrm
keyfile.py44270644editdlrm
keyfile.pyc50100644editdlrm
keyfile.pyo50100644editdlrm
lifecycle.py82540644editdlrm
lifecycle.pyc92330644editdlrm
lifecycle.pyo92330644editdlrm
multidelete.py47570644editdlrm
multidelete.pyc49800644editdlrm
multidelete.pyo49800644editdlrm
multipart.py120490644editdlrm
multipart.pyc119560644editdlrm
multipart.pyo119560644editdlrm
prefix.py16610644editdlrm
prefix.pyc12430644editdlrm
prefix.pyo12430644editdlrm
resumable_download_handler.py155950644editdlrm
resumable_download_handler.pyc103360644editdlrm
resumable_download_handler.pyo103360644editdlrm
tagging.py17320644editdlrm
tagging.pyc36880644editdlrm
tagging.pyo36880644editdlrm
user.py19680644editdlrm
user.pyc15140644editdlrm
user.pyo15140644editdlrm
website.py106070644editdlrm
website.pyc123110644editdlrm
website.pyo123110644editdlrm
__init__.py23450644editdlrm
__init__.pyc18070644editdlrm
__init__.pyo18070644editdlrm
Edit: /usr/lib/python2.6/site-packages/boto/s3/connection.pyo (23607B)
-Sc@sddkZddkZddklZlZddkZddklZddk Z ddk l Z ddk l Z ddklZddklZddklZdd klZlZd Zd Zd efd YZdefdYZdefdYZdefdYZdefdYZdefdYZdefdYZ defdYZ!de fdYZ"dS(iN(tsixturllib(tdetect_potential_s3sigv4(tAWSAuthConnection(thandler(tBucket(tKey(t ResultSet(tBotoClientErrortS3ResponseErrorcCs%|diptdntS(sJ Bucket names must not contain uppercase characters. We check for this by appending a lowercase character and testing with islower(). Note this also covers cases like numeric bucket names with dashes. >>> check_lowercase_bucketname("Aaaa") Traceback (most recent call last): ... BotoClientError: S3Error: Bucket names cannot contain upper-case characters when using either the sub-domain or virtual hosting calling format. >>> check_lowercase_bucketname("1234-5678-9123") True >>> check_lowercase_bucketname("abcdefg1234") True tasuBucket names cannot contain upper-case characters when using either the sub-domain or virtual hosting calling format.(tislowerRtTrue(tn((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pytcheck_lowercase_bucketname(scsfd}|S(Ncs5t|djot|don||S(Nii(tlenR(targstkwargs(tf(s6/usr/lib/python2.6/site-packages/boto/s3/connection.pytwrapperBs$((RR((Rs6/usr/lib/python2.6/site-packages/boto/s3/connection.pytassert_case_insensitiveAst_CallingFormatcBs>eZdZddZdZddZddZRS(cCsdS(Nt((tselftservertbucket((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pytget_bucket_serverKsRcCsCd|}||i||7}||i|i||7}|S(Ns%s://(t build_hosttget_pathtbuild_path_base(Rt connectiontprotocolRRtkeyturl_base((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pytbuild_url_baseNs cCs&|djo|S|i||SdS(NR(R(RRR((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyRTs cCsKtii|}d}|djod|}n|dtii|S(NRt/s/%s(tbototutilstget_utf8_valueRtparsetquote(RRR tpath((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pytbuild_auth_pathZs  cCs&tii|}dtii|S(Ns/%s(R$R%R&RR'R((RRR ((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyRas(t__name__t __module__RR"RR*R(((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyRIs     tSubdomainCallingFormatcBseZedZRS(cCsd||fS(Ns%s.%s((RRR((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyRhs(R+R,RR(((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyR-fstVHostCallingFormatcBseZedZRS(cCs|S(N((RRR((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyRos(R+R,RR(((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyR.mstOrdinaryCallingFormatcBseZdZddZRS(cCs|S(N((RRR((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyRvsRcCsEtii|}d}|o|d|7}n|tii|S(NR#s%s/(R$R%R&RR'R((RRR t path_base((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyRys (R+R,RR(((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyR/ts t(ProtocolIndependentOrdinaryCallingFormatcBseZddZRS(RcCs?d}||i||7}||i|i||7}|S(Ns//(RRR(RRRRRR R!((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyR"s(R+R,R"(((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyR1stLocationcBs>eZdZdZdZdZdZdZdZdZ dZ RS( RtEUs us-west-1s us-west-2s sa-east-1sap-northeast-1sap-southeast-1sap-southeast-2s cn-north-1( R+R,tDEFAULTR3tUSWesttUSWest2tSAEastt APNortheastt APSoutheastt APSoutheast2tCNNorth1(((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyR2stNoHostProvidedcBseZRS((R+R,(((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyR<stHostRequiredErrorcBseZRS((R+R,(((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyR=st S3ConnectioncBseZeiidddZeiidddZdZdde ddddde ddedde de e ddd Z ed Zd Zd Zd ZdZdddddddddd Zddde ddddZddde e de ddZddZddZe ddZddZe ddZdeiddZddZdddddddddZ RS(ts3thostss3.amazonaws.comtcalling_formats)boto.s3.connection.SubdomainCallingFormats)Signature=%s&Expires=%d&AWSAccessKeyId=%siR#tawscCst}| tjot}|i} nt| tiotii | } n| |_ ||_ ||_ t t|i| ||||||||d| d| d| d|d|d|d|d| |o'd |ijotd qndS( Ntdebugthttps_connection_factoryR)tprovidertsecurity_tokentsuppress_consec_slashestvalidate_certst profile_names hmac-v4-s3s6When using SigV4, you must specify a 'host' parameter.(tFalseR<R t DefaultHostt isinstanceRt string_typesR$R%t find_classRAt bucket_classtanontsuperR>t__init__t_required_auth_capabilityR=(Rtaws_access_key_idtaws_secret_access_keyt is_securetporttproxyt proxy_portt proxy_usert proxy_passR@RCRDRAR)RERORFRGRPRHRItno_host_provided((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyRRs(       cCs|iodgSdgSdS(NRPR?(RP(R((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyRSs ccs x|iD] }|Vq WdS(N(tget_all_buckets(RR((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyt__iter__s cCs|i|dj S(N(tlookuptNone(Rt bucket_name((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyt __contains__scCs ||_dS(sX Set the Bucket class associated with this bucket. By default, this would be the boto.s3.key.Bucket class but if you want to subclass that for some reason this allows you to associate your new class. :type bucket_class: class :param bucket_class: A subclass of Bucket that can be more specific N(RO(RRO((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pytset_bucket_classs cCs)dtitii|di|fS(sX Taken from the AWS book Python examples and modified for use with boto s({"expiration": "%s", "conditions": [%s]}t,(ttimetstrftimeR$R%tISO8601tjoin(Rtexpiration_timet conditions((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pytbuild_post_policys ipthttptSTANDARDc Cs|djo g}n| djo g} ntitti|} | id||ido | id|td n| id||o0| id||ihdd6|d6n|o0| id ||ihd d6|d6n|o| id |n|iio<|ihd d6|iid6| id |iin| o0|ihdd6| d6| id| n| o0|ihdd6| d6| id| n|i | | } t i | }|ihdd6|d6|ihdd6|i d6|i i|}|ihdd6|d6|ihdd6|d6d||ii|i|f}h|d6|d6S(s Taken from the AWS book Python examples and modified for use with boto This only returns the arguments required for the post form, not the actual form. This does not return the file input field which also needs to be added :type bucket_name: string :param bucket_name: Bucket to submit to :type key: string :param key: Key name, optionally add ${filename} to the end to attach the submitted filename :type expires_in: integer :param expires_in: Time (in seconds) before this expires, defaults to 6000 :type acl: string :param acl: A canned ACL. One of: * private * public-read * public-read-write * authenticated-read * bucket-owner-read * bucket-owner-full-control :type success_action_redirect: string :param success_action_redirect: URL to redirect to on success :type max_content_length: integer :param max_content_length: Maximum size for this file :type http_method: string :param http_method: HTTP Method to use, "http" or "https" :type storage_class: string :param storage_class: Storage class to use for storing the object. Valid values: STANDARD | REDUCED_REDUNDANCY :type server_side_encryption: string :param server_side_encryption: Specifies server-side encryption algorithm to use when Amazon S3 creates an object. Valid values: None | AES256 :rtype: dict :return: A dictionary containing field names/values as well as a url to POST to .. code-block:: python s{"bucket": "%s"}s ${filename}s["starts-with", "$key", "%s"]s {"key": "%s"}s {"acl": "%s"}tacltnametvalues!{"success_action_redirect": "%s"}tsuccess_action_redirects["content-length-range", 0, %i]sx-amz-security-tokens{"x-amz-security-token": "%s"}sx-amz-storage-classs{"x-amz-storage-class": "%s"}sx-amz-server-side-encryptions&{"x-amz-server-side-encryption": "%s"}tpolicytAWSAccessKeyIdt signatureR s%s://%s/tactiontfieldsN(R`RetgmtimetinttappendtendswithRRERFRktbase64t b64encodeRTt _auth_handlert sign_stringRARt server_name(RRaR t expires_inRnRqtmax_content_lengtht http_methodRvRjt storage_classtserver_side_encryptiont expirationRrt policy_b64Rtturl((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pytbuild_post_form_argssR:         Rc  Cs|ii||} |ii||} |ii|i|} | ido| d } nh} |dj o|| d', validate=False) bucket.get_all_keys(maxkeys=0) :type bucket_name: string :param bucket_name: The name of the bucket :type headers: dict :param headers: Additional headers to pass along with the request to AWS. :type validate: boolean :param validate: If ``True``, it will try to verify the bucket exists on the service-side. (Default: ``True``) RN(t head_bucketRO(RRatvalidateR((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyt get_buckets%cCs|id|d|}|i}|idjo|i||S|idjo:|ii|i|i|}d|_d|_|ni|idjo:|ii|i|i|}d|_d |_|n|ii|i|i|d S( s| Determines if a bucket exists by name. If the bucket does not exist, an ``S3ResponseError`` will be raised. :type bucket_name: string :param bucket_name: The name of the bucket :type headers: dict :param headers: Additional headers to pass along with the request to AWS. :returns: A object tHEADRiit AccessDenieds Access Deniedit NoSuchBuckets#The specified bucket does not existN( RRRRORERRt error_codet error_message(RRaRRRterr((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyRs,            cCs0y|i||d|}Wn d}nX|S(sR Attempts to get a bucket from S3. Works identically to ``S3Connection.get_bucket``, save for that it will return ``None`` if the bucket does not exist instead of throwing an exception. :type bucket_name: string :param bucket_name: The name of the bucket :type headers: dict :param headers: Additional headers to pass along with the request to AWS. :type validate: boolean :param validate: If ``True``, it will try to fetch all keys within the given bucket. (Default: ``True``) RN(RR`(RRaRRR((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyR_'s  cCs t||o2|o|||iis1tPUTRtdataiiN( RREt acl_headerR2R4RRRtstorage_create_errorRROR(RRaRtlocationRrRRR((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyt create_bucket@s$      cCsZ|id|d|}|i}|idjo"|ii|i|i|ndS(s Removes an S3 bucket. In order to remove the bucket, it must first be empty. If the bucket is not empty, an ``S3ResponseError`` will be raised. :type bucket_name: string :param bucket_name: The name of the bucket :type headers: dict :param headers: Additional headers to pass along with the request to AWS. tDELETERiN(RRRRERR(RRRRR((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyt delete_bucketos   c Cs-t||io |i}nt|to |i}n|ii||} tiid| |ii ||} tiid| |ii |i |} |oH| d|7} tiid| | d|7} tiid| nt t |i|| ||| | |d|d| S(Nspath=%ss auth_path=%sRtoverride_num_retriest retry_handler(RLRORoRRARR$tlogRCR*RRRQR>R( RRRR RRt query_argstsenderRRR)RR@((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyRs&   N(!R+R,R$tconfigtgetRKtDefaultCallingFormatRR`R R<RRJRRRRSR^RbRcRkRRRR]RRRR_R2R4RRR(((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyR>sP       p   9 * -.   (#txml.saxRR{t boto.compatRRRet boto.authRt boto.utilsR$tboto.connectionRRtboto.s3.bucketRt boto.s3.keyRtboto.resultsetRtboto.exceptionRR RRtobjectRR-R.R/R1R2R<R=R>(((s6/usr/lib/python2.6/site-packages/boto/s3/connection.pyts,