Module Import alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias Import alias Import alias Import alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr attr Return Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If BoolOpOr CompareIn Str NameLoad CompareIn Str NameLoad body Assign NameStore Str orelse Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore Str If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Delete SubscriptDel AttributeLoad NameLoad attr Index Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore ListLoad AttributeLoad NameLoad attr BoolOpOr Call AttributeLoad NameLoad attr Str Str Call AttributeLoad NameLoad attr Str Str BoolOpOr NameLoad Call AttributeLoad NameLoad attr Str Str NameLoad BinOpAdd Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr Str body Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Str For NameStore Call NameLoad Call AttributeLoad NameLoad attr body AugAssignAdd NameStore BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr attr Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Index Num If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad BoolOpOr SubscriptLoad Call AttributeLoad NameLoad attr Index Num Str attr Str If NameLoad body AugAssignAdd NameStore BinOpAdd Str NameLoad orelse AugAssignAdd NameStore BinOpAdd Str NameLoad AugAssignAdd NameStore BoolOpOr AttributeLoad NameLoad attr Str AugAssignAdd NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr If CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return BinOpAdd Str Call AttributeLoad Str attr NameLoad Return Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd CompareEq AttributeLoad NameLoad attr Str UnaryOpNot CompareIn Str AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list
N/A N/A requests requests.auth AuthBase requests.structures CaseInsensitiveDict datetime datetime N/A hashlib N/A hmac N/A base64 N/A re N/A N/A urlparse urlparse N/A N/A N/A ImportError N/A urllib.parse urlparse N/A BUCKET_VHOST_MATCH N/A N/A re compile ^([a-z0-9\-]+\.)?s3([a-z0-9\-]+)?\.amazonaws\.com$ flags N/A re IGNORECASE N/A AWS_QUERY_PARAMS N/A versioning location acl torrent lifecycle versionid response-content-type response-content-language response-expires response-cache-control response-content-disposition response-content-encoding delete S3Auth N/A AuthBase N/A N/A 
    S3 Custom Authenticator class for requests

    This authenticator will sign your requests based on the RESTAuthentication specs by Amazon
    http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html

    You can read more about custom authenticators here:
    http://docs.python-requests.org/en/latest/user/advanced.html#custom-authentication

    Usage:

    >>> from tinys3.auth import S3Auth
    >>> requests.put('<S3Url>', data='<S3Data'>, auth=S3Auth('<access_key>','<secret_key>'))
     __init__ N/A N/A self access_key secret_key N/A N/A N/A 
        Initiate the authenticator, using S3 Credentials

        Params:
            - access_key    Your S3 access key
            - secret_key    You S3 secret key

         N/A N/A self secret_key secret_key N/A N/A self access_key access_key N/A sign N/A N/A self string_to_sign N/A N/A N/A 
        Generates a signature for the given string

        Params:
            - string_to_sign    The string we want to sign

        Returns:
            Signature in bytes
         N/A digest N/A N/A N/A N/A hmac new N/A N/A N/A self secret_key encode utf8 msg N/A N/A string_to_sign encode utf8 digestmod N/A hashlib sha1 digest N/A N/A N/A N/A N/A N/A N/A base64 b64encode digest strip decode ascii N/A string_to_sign N/A N/A self request N/A N/A N/A 
        Generates the string we need to sign on.

        Params:
            - request   The request object

        Returns
            String ready to be signed on

         N/A h N/A CaseInsensitiveDict N/A N/A N/A h update N/A request headers N/A N/A N/A x-amz-date h N/A x-amz-date h N/A N/A date N/A N/A date N/A N/A N/A h get Date N/A N/A self _get_date N/A N/A N/A request headers N/A Date date N/A content_type N/A N/A Content-Type N/A request headers N/A N/A content_type N/A N/A h get Content-Type N/A N/A N/A request headers N/A Content-Type N/A N/A N/A request headers N/A Content-Type content_type N/A msg N/A N/A request method N/A N/A N/A h get Content-MD5 N/A N/A h get Content-MD5 N/A content_type N/A N/A h get Content-Type date N/A N/A N/A self _get_canonicalized_amz_headers h N/A N/A self _get_canonicalized_resource request N/A N/A N/A join msg N/A _get_canonicalized_amz_headers N/A N/A self headers N/A N/A N/A 
        Collect the special Amazon headers, prepare them for signing

        Params:
            - headers   CaseInsensitiveDict with the header requests

        Returns:
            - String with the canonicalized headers

        More information about this process here:
        http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html#RESTAuthenticationConstructingCanonicalizedAmzHeaders
         N/A amz_dict N/A N/A N/A k v N/A N/A headers items N/A N/A N/A isinstance k bytes N/A N/A k N/A N/A k decode ascii N/A k N/A N/A k lower N/A N/A N/A k startswith x-amz N/A N/A N/A amz_dict N/A k v N/A result N/A k N/A sorted N/A N/A amz_dict keys N/A N/A result N/A %s:%s
 N/A N/A N/A k strip N/A N/A N/A N/A N/A amz_dict N/A k strip replace N/A result N/A _get_canonicalized_resource N/A N/A self request N/A N/A N/A 
        Generates the canonicalized resource string form a request

        You can read more about the process here:
        http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html#ConstructingTheCanonicalizedResourceElement

        Params:
            - request   The request object

        Returns:
            String the canoncicalized resource string.
         N/A r N/A parts N/A urlparse N/A request url N/A host N/A N/A N/A N/A parts netloc split : N/A 0 N/A host N/A N/A m N/A N/A BUCKET_VHOST_MATCH match host N/A m N/A N/A bucket N/A N/A N/A N/A N/A N/A m groups N/A 0 rstrip . N/A bucket N/A N/A r N/A / bucket N/A N/A r N/A / host N/A r N/A N/A parts path / N/A r N/A N/A self _get_subresource N/A parts query N/A r N/A _get_subresource N/A N/A self qs N/A N/A N/A 
        Handle subresources in the query string

        More information about subresources:
        http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html#ConstructingTheCanonicalizedResourceElement
         N/A r N/A N/A keys N/A N/A qs split & N/A i keys N/A N/A item N/A N/A i split = N/A k N/A N/A N/A item N/A 0 lower N/A N/A k AWS_QUERY_PARAMS N/A N/A N/A N/A r append i N/A r N/A N/A N/A ? N/A N/A & join r N/A N/A _get_date N/A N/A self N/A N/A N/A 
        Returns a string for the current date
         N/A N/A N/A N/A N/A datetime utcnow strftime %a, %d %b %Y %H:%M:%S GMT N/A _fix_content_length N/A N/A self request N/A N/A N/A 
        Amazon requires to have content-length header when using the put request,
        However, requests won't add this header, so we need to add it ourselves.

        Params:
            - request   The request object
         N/A N/A N/A N/A request method PUT N/A N/A Content-Length N/A request headers N/A N/A N/A N/A request headers N/A Content-Length 0 N/A __call__ N/A N/A self r N/A N/A N/A 
        The entry point of the custom authenticator.

        When used as an auth class, requests will call this method just before sending
        the request.

        Params:
            - r     The request object

        Returns:
            The request object, after we've updated some headers
         N/A msg N/A N/A self string_to_sign r N/A N/A N/A r headers N/A Authorization N/A AWS %s:%s N/A N/A self access_key N/A N/A self sign msg N/A N/A N/A self _fix_content_length r N/A r N/A N/A