Module Import alias Import alias If CompareLt SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Import alias ImportFrom alias ImportFrom alias orelse ImportFrom alias identifier ImportFrom alias ImportFrom alias Import alias ImportFrom alias alias ImportFrom alias alias alias alias alias FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Str Str Str Assign NameStore ListLoad Str Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str ClassDef bases body Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr TupleLoad Assign AttributeStore NameLoad attr NameLoad If BoolOpAnd CompareIn Str AttributeLoad NameLoad attr CompareIn SubscriptLoad AttributeLoad NameLoad attr Index Str ListLoad Num Str body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index NameLoad orelse Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad AttributeLoad NameLoad attr attr body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad AttributeLoad NameLoad attr attr body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr NameLoad body If AttributeLoad AttributeLoad NameLoad attr attr body Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr orelse Assign AttributeStore NameLoad attr Call NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad NameLoad attr Dict orelse Assign NameStore Call NameLoad Dict If CompareIs NameLoad NameLoad body Assign NameStore Dict TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body TryExcept body Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad keyword NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call AttributeLoad NameLoad attr NameLoad ExceptHandler type NameLoad name NameStore body Raise Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Str IfExp AttributeLoad AttributeLoad NameLoad attr attr Str Str If CompareEq NameLoad Str body Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad orelse Assign NameStore AttributeLoad NameLoad attr If NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Dict If CompareIs NameLoad NameLoad body Assign NameStore Dict Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call NameLoad NameLoad If AttributeLoad AttributeLoad NameLoad attr attr body Print BinOpMod Str TupleLoad NameLoad NameLoad NameLoad NameLoad If BoolOpAnd CompareIs NameLoad Str UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Str If AttributeLoad AttributeLoad NameLoad attr attr body Print Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore NameLoad Assign NameStore NameLoad If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameLoad If BoolOpOr CompareLtELtE Num AttributeLoad NameLoad attr Num CompareEq AttributeLoad NameLoad attr Num body Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Call NameLoad AttributeLoad NameLoad attr Raise Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str ClassDef bases body Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A os N/A sys N/A N/A N/A N/A sys version_info N/A 0 3 N/A N/A httplib urllib urlencode urllib2 urlopen N/A http client httplib urllib.parse urlencode urllib.request urlopen N/A socket httplib2 Http ServerNotFoundError N/A exc interface meta serialization response validate N/A N/A obj N/A N/A N/A Validates a handler implementation against the IRequest interface. N/A members N/A add_param add_url_param add_header make_request handle_response N/A metas N/A response_handler serialization_handler serialize deserialize N/A N/A N/A interface validate IRequest obj members metas N/A IRequest N/A N/A interface Interface N/A N/A 
    This class defines the Request Handler Interface.  Classes that
    implement this handler must provide the methods and attributes defined
    below.

    All implementations must provide sane 'default' functionality when
    instantiated with no arguments.  Meaning, it can and should accept
    optional parameters that alter how it functions, but can not require
    any parameters.

    Implementations do *not* subclass from interfaces.

     add_param N/A N/A key value N/A N/A N/A 
        Add extra parameters to pass along with  *every* request.
        These are passed with the request 'payload' (serialized if a
        serialization handler is enabled).  With GET requests they are
        appended to the URL.

        Required Arguments:

            key
                The key of the parameter to add.

            value
                The value of the parameter to add.

         N/A add_url_param N/A N/A key value N/A N/A N/A 
        Similar to 'add_params', however this function adds extra parameters
        to the url for *every* request.
        These are *not* passed with the request 'payload' (serialized if a
        serialization handler is enabled) except for GET requests.

        Required Arguments:

            key
                The key of the parameter to add.

            value
                The value of the parameter to add.

         N/A add_header N/A N/A key value N/A N/A N/A 
        Add extra headers to pass along with *every* request.

        Required Arguments:

            key
                The key of the header to add.

            value
                The value of the header to add.

         N/A make_request N/A N/A method path params headers N/A None None N/A N/A 
        Make a request with the upstream API.

        Required Arguments:

            method
                The HTTP method to request as.  I.e. ['GET', 'POST', 'PUT',
                'DELETE', '...'].

            path
                The of the request url *after* the baseurl.


        Optional Arguments:

            params
                Dictionary of parameters to pass with the request.  These will be serialized
                if configured to serialize.

            headers
                Dictionary of headers to pass to the request.

         N/A handle_response N/A N/A response_object N/A N/A N/A 
        Called after the request is made.  This is a convenient place for
        developers to handle what happens during every request per their
        application needs.

        Required Arguments:

            response_object
                The response object created by the request.

         N/A N/A RequestHandler N/A N/A meta MetaMixin N/A N/A 
    Generic class that handles HTTP requests.  Uses the Json Serialization
    handler by default, but only 'deserializes' response content.

    Optional Arguments / Meta:

        debug
            Boolean.  Toggle debug console output.  Default: False.

        ignore_ssl_validation
            Boolean.  Whether or not to ignore ssl validation errors.
            Default: False

        response_handler
            An un-instantiated Response Handler class used to return
            responses to the caller.  Default: drest.response.ResponseHandler.

        serialization_handler
            An un-instantiated Serialization Handler class used to
            serialize/deserialize data.
            Default: drest.serialization.JsonSerializationHandler.

        serialize
            Boolean.  Whether or not to serialize data before sending
            requests.  Default: False.

        deserialize
            Boolean.  Whether or not to deserialize data before returning
            the Response object.  Default: True.

        trailing_slash
            Boolean.  Whether or not to append a trailing slash to the
            request url.  Default: True.

        timeout
            The amount of seconds where a request should timeout.
            Default: None

     Meta N/A N/A N/A debug False N/A ignore_ssl_validation False N/A response_handler N/A response ResponseHandler N/A serialization_handler N/A serialization JsonSerializationHandler N/A serialize False N/A deserialize True N/A trailing_slash True N/A allow_get_body False N/A timeout None N/A __init__ N/A N/A self N/A kw N/A N/A N/A N/A N/A super RequestHandler self __init__ kw N/A N/A self _extra_params N/A N/A N/A self _extra_url_params N/A N/A N/A self _extra_headers N/A N/A N/A self _auth_credentials N/A N/A N/A self _http None N/A N/A N/A DREST_DEBUG N/A os environ N/A N/A N/A os environ N/A DREST_DEBUG N/A 1 1 N/A N/A N/A N/A self _meta debug True N/A N/A N/A response validate N/A N/A self _meta response_handler N/A N/A N/A self _meta serialization_handler N/A N/A N/A N/A serialization validate N/A N/A self _meta serialization_handler N/A N/A self _serialization N/A N/A N/A self _meta serialization_handler kw N/A headers N/A N/A N/A self _serialization get_headers N/A key headers N/A N/A N/A N/A self add_header key N/A headers N/A key N/A N/A N/A N/A self _meta serialize False N/A N/A N/A self _meta deserialize False N/A _serialize N/A N/A self data N/A N/A N/A N/A N/A self _meta serialize N/A N/A N/A N/A N/A self _serialization serialize data N/A N/A data N/A _deserialize N/A N/A self data N/A N/A N/A N/A N/A self _meta deserialize N/A N/A N/A N/A N/A self _serialization deserialize data N/A N/A data N/A set_auth_credentials N/A N/A self user password N/A N/A N/A 
        Set the authentication user and password that will be used for
        HTTP Basic and Digest Authentication.

        Required Arguments:

            user
                The authentication username.

            password
                That user's password.

         N/A N/A self _auth_credentials N/A user password N/A N/A N/A self _clear_http N/A add_param N/A N/A self key value N/A N/A N/A 
        Adds a key/value to self._extra_params, which is sent with every
        request.

        Required Arguments:

            key
                The key of the parameter.

            value
                The value of 'key'.

         N/A N/A N/A self _extra_params N/A key value N/A add_url_param N/A N/A self key value N/A N/A N/A 
        Adds a key/value to self._extra_url_params, which is sent with every
        request (in the URL).

        Required Arguments:

            key
                The key of the parameter.

            value
                The value of 'key'.

         N/A N/A N/A self _extra_url_params N/A key value N/A add_header N/A N/A self key value N/A N/A N/A 
        Adds a key/value to self._extra_headers, which is sent with every
        request.

        Required Arguments:

            key
                The key of the parameter.

            value
                The value of 'key'.

         N/A N/A N/A self _extra_headers N/A key value N/A _get_http N/A N/A self N/A N/A N/A 
        Returns either the existing (cached) httplib2.Http() object, or
        a new instance of one.

         N/A N/A N/A self _http None N/A N/A N/A N/A self _meta ignore_ssl_validation N/A N/A N/A self _http N/A Http disable_ssl_certificate_validation True timeout N/A N/A self _meta timeout N/A N/A N/A self _http N/A Http timeout N/A N/A self _meta timeout N/A N/A self _auth_credentials N/A N/A N/A N/A N/A self _http add_credentials N/A N/A self _auth_credentials N/A 0 N/A N/A self _auth_credentials N/A 1 N/A N/A self _http N/A _clear_http N/A N/A self N/A N/A N/A N/A self _http None N/A _make_request N/A N/A self url method payload headers N/A None None N/A N/A 
        A wrapper around httplib2.Http.request.

        Required Arguments:

            url
                The url of the request.

            method
                The method of the request. I.e. 'GET', 'PUT', 'POST', 'DELETE'.

        Optional Arguments:

            payload
                The urlencoded parameters.

            headers
                Additional headers of the request.

         N/A N/A payload None N/A N/A N/A N/A self _meta serialize N/A N/A payload N/A N/A self _serialize N/A N/A N/A payload N/A urlencode N/A N/A N/A headers None N/A N/A headers N/A N/A N/A N/A http N/A N/A self _get_http N/A N/A N/A http request url method payload headers headers N/A N/A N/A N/A socket error N/A e N/A N/A N/A N/A N/A N/A self _clear_http N/A N/A N/A N/A N/A self _get_http request url method payload headers headers N/A N/A N/A N/A socket error N/A e N/A N/A N/A N/A exc dRestAPIError e N/A N/A ServerNotFoundError N/A e N/A N/A N/A N/A exc dRestAPIError N/A N/A e args N/A 0 N/A _get_complete_url N/A N/A self method url params N/A N/A N/A url N/A %s%s N/A N/A N/A url strip / N/A N/A N/A self _meta trailing_slash / N/A N/A method GET N/A N/A url_params N/A dict N/A self _extra_url_params params N/A N/A url_params N/A self _extra_url_params N/A url_params N/A N/A url N/A %s?%s N/A url N/A urlencode url_params N/A url N/A make_request N/A N/A self method url params headers N/A None None N/A N/A 
        Make a call to a resource based on path, and parameters.

        Required Arguments:

            method
                One of HEAD, GET, POST, PUT, PATCH, DELETE, etc.

            url
                The full url of the request (without any parameters).  Any
                params (with GET method) and self.extra_url_params will be
                added to this url.

        Optional Arguments:

            params
                Dictionary of additional (one-time) keyword arguments for the
                request.

            headers
                Dictionary of additional (one-time) headers of the request.

         N/A N/A params None N/A N/A params N/A N/A N/A headers None N/A N/A headers N/A N/A params N/A dict N/A self _extra_params params N/A headers N/A dict N/A self _extra_headers headers N/A url N/A N/A self _get_complete_url method url params N/A N/A N/A self _meta serialize N/A N/A payload N/A N/A self _serialize params N/A N/A payload N/A urlencode params N/A N/A N/A self _meta debug N/A N/A N/A DREST_DEBUG: method=%s url=%s params=%s headers=%s N/A method url payload headers N/A N/A N/A method GET N/A N/A N/A self _meta allow_get_body N/A N/A payload N/A N/A N/A self _meta debug N/A N/A DREST_DEBUG: supressing body for GET request N/A N/A res_headers data N/A N/A self _make_request url method payload headers headers N/A unserialized_data data N/A serialized_data None N/A N/A N/A self _meta deserialize N/A N/A serialized_data data N/A data N/A N/A self _deserialize data N/A return_response N/A N/A response ResponseHandler N/A int N/A res_headers N/A status data res_headers N/A N/A N/A self handle_response return_response N/A handle_response N/A N/A self response_object N/A N/A N/A 
        A simple wrapper to handle the response.  By default raises
        exc.dRestRequestError if the response code is within 400-499, or 500.
        Must return the original, or modified, response object.

        Required Arguments:

            response_object
                The response object created by the request.

         N/A response response_object N/A N/A N/A 400 N/A response status 499 N/A N/A response status 500 N/A N/A msg N/A Received HTTP Code %s - %s N/A N/A response status N/A N/A httplib responses N/A N/A int N/A response status N/A N/A N/A exc dRestRequestError msg response response N/A response N/A N/A TastyPieRequestHandler N/A RequestHandler N/A N/A 
    This class implements the IRequest interface, specifically tailored for
    interfacing with `TastyPie <http://django-tastypie.readthedocs.org/en/latest>`_.

    See :mod:`drest.request.RequestHandler` for Meta options and usage.

     Meta N/A N/A N/A serialize True N/A deserialize True N/A serialization_handler N/A serialization JsonSerializationHandler N/A __init__ N/A N/A self N/A kw N/A N/A N/A N/A N/A super TastyPieRequestHandler self __init__ kw N/A N/A