Module Expr Str ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If BoolOpAnd NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str If CompareEq Call NameLoad NameLoad Num body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad orelse Assign NameStore NameLoad If UnaryOpNot NameLoad body Return Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareNotEq NameLoad NameLoad body Return Call NameLoad NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index Str keyword Str keyword Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body If NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Str NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return BinOpAdd BinOpAdd NameLoad Str Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num orelse If BoolOpOr CompareLt AttributeLoad NameLoad attr Num CompareGtE AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr ListLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index Str If NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad Str Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword Str keyword Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad Str NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return BinOpAdd BinOpAdd NameLoad Str Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num orelse If BoolOpOr CompareLt AttributeLoad NameLoad attr Num CompareGtE AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Raise Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Dict Str body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword Str keyword Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Assign NameStore Dict Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict Str Str NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return BinOpAdd NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareEq NameLoad Str body Continue If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad orelse TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Assert CompareIn Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr GeneratorExp TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Assign NameStore ListComp TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad CompareNotEq NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Dict NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore NameStore SubscriptLoad NameLoad Slice Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore BinOpAdd BinOpAdd BinOpAdd Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad Assign NameStore TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad NameLoad Assign NameStore BinOpMod Str Call NameLoad SubscriptLoad NameLoad Index Str If NameLoad body AugAssignAdd NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr Return SubscriptLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Slice Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Return Call AttributeLoad NameLoad attr NameLoad keyword Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword SubscriptLoad SubscriptLoad NameLoad Index Str Index Num keyword SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Assign NameStore TupleLoad Str Str Expr Call AttributeLoad NameLoad attr GeneratorExp TupleLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num comprehension NameStore NameLoad CompareNotIn NameLoad NameLoad Return NameLoad decorator_list
N/A N/A 
    tipfy.auth.oauth
    ~~~~~~~~~~~~~~~~

    Implementation of OAuth authentication scheme.

    Ported from `tornado.auth`_ and python-oauth2.

    :copyright: 2007 Leah Culver.
    :copyright: 2009 Facebook.
    :copyright: 2011 tipfy.org.
    :license: MIT License / Apache License Version 2.0, see LICENSE.txt for
        more details.
 __future__ absolute_import N/A base64 N/A binascii N/A cgi N/A functools N/A hashlib N/A hmac N/A logging N/A time N/A urllib N/A urlparse N/A uuid google.appengine.api urlfetch OAuthMixin N/A object N/A N/A A :class:`tipfy.RequestHandler` mixin that implements OAuth
    authentication.
     N/A _OAUTH_VERSION 1.0a N/A _OAUTH_NO_CALLBACKS False authorize_redirect N/A N/A self callback_uri extra_params N/A None None N/A N/A Redirects the user to obtain OAuth authorization for this service.

        Twitter and FriendFeed both require that you register a Callback
        URL with your application. You should call this method to log the
        user in, and then call get_authenticated_user() in the handler
        you registered as your Callback URL to complete the authorization
        process.

        This method sets a cookie called _oauth_request_token which is
        subsequently used (and cleared) in get_authenticated_user for
        security purposes.

        :param callback_uri:
        :param oauth_authorize_url:
            OAuth authorization URL. If not set, uses the value set in
            :attr:`_OAUTH_AUTHORIZE_URL`.
        :returns:
         N/A N/A callback_uri N/A self _OAUTH_NO_CALLBACKS N/A N/A N/A Exception This service does not support oauth_callback. N/A N/A N/A self _OAUTH_VERSION 1.0a N/A N/A url N/A N/A self _oauth_request_token_url callback_uri callback_uri extra_params extra_params N/A N/A url N/A N/A self _oauth_request_token_url N/A N/A N/A response N/A N/A urlfetch fetch url deadline 10 N/A N/A N/A N/A urlfetch DownloadError N/A e N/A N/A N/A N/A logging exception e N/A response None N/A N/A N/A self _on_request_token N/A self _OAUTH_AUTHORIZE_URL callback_uri response N/A get_authenticated_user N/A N/A self callback N/A N/A N/A Gets the OAuth authorized user and access token on callback.

        This method should be called from the handler for your registered
        OAuth Callback URL to complete the registration process. We call
        callback with the authenticated user, which in addition to standard
        attributes like 'name' includes the 'access_key' attribute, which
        contains the OAuth access you can use to make authorized requests
        to this service on behalf of the user.

        :param callback:
        :returns:
         N/A request_key N/A N/A N/A N/A self request args get oauth_token N/A oauth_verifier N/A N/A N/A N/A self request args get oauth_verifier None N/A request_cookie N/A N/A N/A N/A self request cookies get _oauth_request_token N/A request_cookie N/A N/A parts N/A N/A request_cookie split | N/A N/A N/A len parts 2 N/A N/A N/A N/A cookie_key N/A N/A base64 b64decode N/A parts N/A 0 N/A cookie_secret N/A N/A base64 b64decode N/A parts N/A 1 N/A N/A N/A TypeError N/A e N/A N/A N/A N/A logging exception e N/A request_cookie None N/A N/A request_cookie None N/A N/A request_cookie N/A N/A N/A callback None N/A N/A N/A N/A self session_store delete_cookie _oauth_request_token N/A N/A cookie_key request_key N/A N/A N/A callback None N/A token N/A dict key cookie_key secret cookie_secret N/A oauth_verifier N/A N/A N/A token N/A verifier oauth_verifier N/A N/A N/A url N/A N/A self _oauth_access_token_url token N/A response N/A N/A urlfetch fetch url deadline 10 N/A N/A N/A N/A urlfetch DownloadError N/A e N/A N/A N/A N/A logging exception e N/A response None N/A N/A N/A self _on_access_token callback response N/A _oauth_request_token_url N/A N/A self callback_uri extra_params N/A None None N/A N/A 

        :returns:
         N/A consumer_token N/A N/A self _oauth_consumer_token N/A url N/A self _OAUTH_REQUEST_TOKEN_URL N/A args N/A dict oauth_consumer_key N/A consumer_token N/A key oauth_signature_method HMAC-SHA1 oauth_timestamp N/A str N/A int N/A N/A time time oauth_nonce N/A N/A binascii b2a_hex N/A N/A N/A uuid uuid4 bytes oauth_version N/A self _OAUTH_VERSION N/A N/A N/A self _OAUTH_VERSION 1.0a N/A N/A callback_uri N/A N/A N/A args N/A oauth_callback N/A N/A urlparse urljoin N/A N/A self request url callback_uri N/A extra_params N/A N/A N/A N/A args update extra_params N/A signature N/A _oauth_signature consumer_token GET url args N/A N/A args N/A oauth_signature signature N/A N/A N/A url ? N/A N/A urllib urlencode args N/A _on_request_token N/A N/A self authorize_url callback_uri response N/A N/A N/A 
        :param authorize_url:
        :param callback_uri:
        :param response:
        :returns:
         N/A N/A response N/A N/A N/A N/A logging warning Could not get OAuth request token. N/A N/A N/A self abort 500 N/A N/A N/A N/A N/A response status_code 200 N/A N/A response status_code 300 N/A N/A N/A N/A logging warning Bad OAuth response when requesting a token (%d): %s N/A response status_code N/A response content N/A N/A N/A self abort 500 N/A request_token N/A _oauth_parse_response N/A response content N/A data N/A N/A | join N/A N/A N/A base64 b64encode N/A request_token N/A key N/A N/A base64 b64encode N/A request_token N/A secret N/A N/A N/A N/A self session_store set_cookie _oauth_request_token data N/A args N/A dict oauth_token N/A request_token N/A key N/A callback_uri N/A N/A N/A args N/A oauth_callback N/A N/A urlparse urljoin N/A N/A self request url callback_uri N/A N/A N/A self redirect N/A N/A authorize_url ? N/A N/A urllib urlencode args N/A _oauth_access_token_url N/A N/A self request_token N/A N/A N/A 
        :param request_token:
        :returns:
         N/A consumer_token N/A N/A self _oauth_consumer_token N/A url N/A self _OAUTH_ACCESS_TOKEN_URL N/A args N/A dict oauth_consumer_key N/A consumer_token N/A key oauth_token N/A request_token N/A key oauth_signature_method HMAC-SHA1 oauth_timestamp N/A str N/A int N/A N/A time time oauth_nonce N/A N/A binascii b2a_hex N/A N/A N/A uuid uuid4 bytes oauth_version N/A self _OAUTH_VERSION N/A N/A verifier request_token N/A N/A N/A args N/A oauth_verifier N/A request_token N/A verifier N/A signature N/A _oauth_signature consumer_token GET url args request_token N/A N/A args N/A oauth_signature signature N/A N/A N/A url ? N/A N/A urllib urlencode args N/A _on_access_token N/A N/A self callback response N/A N/A N/A 
        :param callback:
        :param response:
        :returns:
         N/A N/A response N/A N/A N/A N/A logging warning Could not get OAuth access token. N/A N/A N/A self abort 500 N/A N/A N/A N/A N/A response status_code 200 N/A N/A response status_code 300 N/A N/A N/A N/A logging warning Bad OAuth response trying to get access token (%d): %s N/A response status_code N/A response content N/A N/A N/A self abort 500 N/A access_token N/A _oauth_parse_response N/A response content N/A N/A N/A self _oauth_get_user access_token N/A N/A functools partial N/A self _on_oauth_get_user access_token callback N/A _oauth_get_user N/A N/A self access_token callback N/A N/A N/A 
        :param access_token:
        :param callback:
        :returns:
         N/A N/A NotImplementedError N/A _on_oauth_get_user N/A N/A self access_token callback user N/A N/A N/A 
        :param access_token:
        :param callback:
        :param user:
        :returns:
         N/A N/A user N/A N/A N/A callback None N/A N/A user N/A access_token access_token N/A N/A callback user N/A _oauth_request_parameters N/A N/A self url access_token parameters method N/A N/A GET N/A N/A Returns the OAuth parameters as a dict for the given request.

        parameters should include all POST arguments and query string arguments
        that will be sent with the request.

        :param url:
        :param access_token:
        :param parameters:
        :param method:
        :returns:
         N/A consumer_token N/A N/A self _oauth_consumer_token N/A base_args N/A dict oauth_consumer_key N/A consumer_token N/A key oauth_token N/A access_token N/A key oauth_signature_method HMAC-SHA1 oauth_timestamp N/A str N/A int N/A N/A time time oauth_nonce N/A N/A binascii b2a_hex N/A N/A N/A uuid uuid4 bytes oauth_version N/A self _OAUTH_VERSION N/A args N/A N/A N/A N/A args update base_args N/A N/A N/A args update parameters N/A signature N/A _oauth_signature consumer_token method url args access_token N/A N/A base_args N/A oauth_signature signature N/A base_args N/A N/A OAuth2Mixin N/A object N/A N/A Abstract implementation of OAuth v 2. authorize_redirect N/A N/A self redirect_uri client_id client_secret extra_params N/A None None None None N/A N/A Redirects the user to obtain OAuth authorization for this service.

        Some providers require that you register a Callback
        URL with your application. You should call this method to log the
        user in, and then call get_authenticated_user() in the handler
        you registered as your Callback URL to complete the authorization
        process.
         N/A args N/A redirect_uri client_id redirect_uri client_id N/A extra_params N/A N/A N/A N/A args update extra_params N/A N/A N/A self redirect N/A N/A self _OAUTH_AUTHORIZE_URL N/A N/A urllib urlencode args N/A _oauth_request_token_url N/A N/A self redirect_uri client_id client_secret code extra_params N/A None None None None None N/A N/A url N/A self _OAUTH_ACCESS_TOKEN_URL N/A args N/A dict redirect_uri redirect_uri code code client_id client_id client_secret client_secret N/A extra_params N/A N/A N/A N/A args update extra_params N/A N/A url N/A N/A urllib urlencode args N/A N/A _to_utf8 N/A N/A s N/A N/A N/A N/A isinstance s unicode N/A N/A N/A N/A s encode utf-8 N/A s N/A _split_url_string N/A N/A param_str N/A N/A N/A Turn URL string into parameters. N/A parameters N/A N/A cgi parse_qs N/A N/A param_str encode utf-8 keep_blank_values True N/A res N/A N/A N/A k v N/A N/A parameters iteritems N/A N/A N/A res N/A k N/A N/A urllib unquote N/A v N/A 0 N/A res N/A _get_normalized_parameters N/A N/A parameters query N/A N/A N/A Return a string that contains the parameters that must be signed. N/A items N/A N/A N/A key value N/A N/A parameters iteritems N/A N/A N/A key oauth_signature N/A N/A N/A N/A isinstance value basestring N/A N/A N/A N/A items append N/A N/A _to_utf8 key N/A _to_utf8 value N/A N/A N/A N/A value N/A list value N/A N/A N/A TypeError N/A e N/A N/A N/A is not iterable N/A str e N/A N/A N/A items append N/A N/A _to_utf8 key N/A _to_utf8 value N/A N/A N/A N/A items extend N/A N/A N/A _to_utf8 key N/A _to_utf8 item N/A item value N/A url_items N/A N/A N/A _split_url_string query items N/A url_items N/A N/A N/A _to_utf8 k N/A _to_utf8 v N/A N/A k v url_items N/A k oauth_signature N/A N/A N/A items extend url_items N/A N/A N/A items sort N/A encoded_str N/A N/A urllib urlencode items N/A N/A N/A N/A N/A encoded_str replace + %20 replace %7E ~ N/A _oauth_signature N/A N/A consumer_token method url parameters token N/A N/A None N/A N/A Calculates the HMAC-SHA1 OAuth signature for the given request.

    See http://oauth.net/core/1.0/#signing_process

    :param consumer_token:
    :param method:
    :param url:
    :param parameters:
    :param token:
    :returns:
     N/A parts N/A N/A urlparse urlparse url N/A N/A scheme netloc path N/A parts N/A 3 N/A query N/A parts N/A 4 N/A normalized_url N/A N/A N/A N/A N/A scheme lower :// N/A N/A netloc lower path N/A sig N/A N/A _oauth_escape method N/A _oauth_escape normalized_url N/A _oauth_escape N/A _get_normalized_parameters parameters query N/A key N/A %s& N/A _oauth_escape N/A consumer_token N/A secret N/A token N/A N/A key N/A _oauth_escape N/A token N/A secret N/A base_string N/A N/A & join sig N/A hashed N/A N/A hmac new key base_string N/A hashlib sha1 N/A N/A N/A N/A binascii b2a_base64 N/A N/A hashed digest N/A -1 N/A _oauth_escape N/A N/A val N/A N/A N/A 
    :param val:
    :returns:
     N/A N/A isinstance val unicode N/A N/A val N/A N/A val encode utf-8 N/A N/A N/A urllib quote val safe ~ N/A _oauth_parse_response N/A N/A body N/A N/A N/A 
    :param body:
    :returns:
     N/A p N/A N/A cgi parse_qs body keep_blank_values False N/A token N/A dict key N/A N/A p N/A oauth_token N/A 0 secret N/A N/A p N/A oauth_token_secret N/A 0 N/A special N/A oauth_token oauth_token_secret N/A N/A N/A token update N/A N/A k N/A N/A p N/A k N/A 0 N/A k p N/A k special N/A token N/A