Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
pip._vendor.requests.cookies.RequestsCookieJar Class Reference
Inheritance diagram for pip._vendor.requests.cookies.RequestsCookieJar:

Public Member Functions

def get
 
def set
 
def iterkeys
 
def keys
 
def itervalues
 
def values
 
def iteritems
 
def items
 
def list_domains
 
def list_paths
 
def multiple_domains
 
def get_dict
 
def __getitem__
 
def __setitem__
 
def __delitem__
 
def set_cookie
 
def update
 
def __getstate__
 
def __setstate__
 
def copy
 

Private Member Functions

def _find
 
def _find_no_duplicates
 

Private Attributes

 _cookies_lock
 

Detailed Description

Compatibility class; is a cookielib.CookieJar, but exposes a dict interface.

This is the CookieJar we create by default for requests and sessions that
don't specify one, since some clients may expect response.cookies and
session.cookies to support dict operations.

Don't use the dict interface internally; it's just for compatibility with
with external client code. All `requests` code should work out of the box
with externally provided instances of CookieJar, e.g., LWPCookieJar and
FileCookieJar.

Caution: dictionary operations that are normally O(1) may be O(n).

Unlike a regular CookieJar, this class is pickleable.

Member Function Documentation

def pip._vendor.requests.cookies.RequestsCookieJar.__delitem__ (   self,
  name 
)
Deletes a cookie given a name. Wraps cookielib.CookieJar's remove_cookie_by_name().
def pip._vendor.requests.cookies.RequestsCookieJar.__getitem__ (   self,
  name 
)
Dict-like __getitem__() for compatibility with client code. Throws exception
if there are more than one cookie with name. In that case, use the more
explicit get() method instead. Caution: operation is O(n), not O(1).
def pip._vendor.requests.cookies.RequestsCookieJar.__getstate__ (   self)
Unlike a normal CookieJar, this class is pickleable.
def pip._vendor.requests.cookies.RequestsCookieJar.__setitem__ (   self,
  name,
  value 
)
Dict-like __setitem__ for compatibility with client code. Throws exception
if there is already a cookie of that name in the jar. In that case, use the more
explicit set() method instead.
def pip._vendor.requests.cookies.RequestsCookieJar.__setstate__ (   self,
  state 
)
Unlike a normal CookieJar, this class is pickleable.
def pip._vendor.requests.cookies.RequestsCookieJar._find (   self,
  name,
  domain = None,
  path = None 
)
private
Requests uses this method internally to get cookie values. Takes as args name
and optional domain and path. Returns a cookie.value. If there are conflicting cookies,
_find arbitrarily chooses one. See _find_no_duplicates if you want an exception thrown
if there are conflicting cookies.
def pip._vendor.requests.cookies.RequestsCookieJar._find_no_duplicates (   self,
  name,
  domain = None,
  path = None 
)
private
__get_item__ and get call _find_no_duplicates -- never used in Requests internally.
Takes as args name and optional domain and path. Returns a cookie.value.
Throws KeyError if cookie is not found and CookieConflictError if there are
multiple cookies that match name and optionally domain and path.
def pip._vendor.requests.cookies.RequestsCookieJar.copy (   self)
Return a copy of this RequestsCookieJar.
def pip._vendor.requests.cookies.RequestsCookieJar.get (   self,
  name,
  default = None,
  domain = None,
  path = None 
)
Dict-like get() that also supports optional domain and path args in
order to resolve naming collisions from using one cookie jar over
multiple domains. Caution: operation is O(n), not O(1).
def pip._vendor.requests.cookies.RequestsCookieJar.get_dict (   self,
  domain = None,
  path = None 
)
Takes as an argument an optional domain and path and returns a plain old
Python dict of name-value pairs of cookies that meet the requirements.
def pip._vendor.requests.cookies.RequestsCookieJar.items (   self)
Dict-like items() that returns a list of name-value tuples from the jar.
See keys() and values(). Allows client-code to call "dict(RequestsCookieJar)
and get a vanilla python dict of key value pairs.
def pip._vendor.requests.cookies.RequestsCookieJar.iteritems (   self)
Dict-like iteritems() that returns an iterator of name-value tuples from the jar.
See iterkeys() and itervalues().
def pip._vendor.requests.cookies.RequestsCookieJar.iterkeys (   self)
Dict-like iterkeys() that returns an iterator of names of cookies from the jar.
See itervalues() and iteritems().
def pip._vendor.requests.cookies.RequestsCookieJar.itervalues (   self)
Dict-like itervalues() that returns an iterator of values of cookies from the jar.
See iterkeys() and iteritems().
def pip._vendor.requests.cookies.RequestsCookieJar.keys (   self)
Dict-like keys() that returns a list of names of cookies from the jar.
See values() and items().
def pip._vendor.requests.cookies.RequestsCookieJar.list_domains (   self)
Utility method to list all the domains in the jar.
def pip._vendor.requests.cookies.RequestsCookieJar.list_paths (   self)
Utility method to list all the paths in the jar.
def pip._vendor.requests.cookies.RequestsCookieJar.multiple_domains (   self)
Returns True if there are multiple domains in the jar.
Returns False otherwise.
def pip._vendor.requests.cookies.RequestsCookieJar.set (   self,
  name,
  value,
  kwargs 
)
Dict-like set() that also supports optional domain and path args in
order to resolve naming collisions from using one cookie jar over
multiple domains.
def pip._vendor.requests.cookies.RequestsCookieJar.set_cookie (   self,
  cookie,
  args,
  kwargs 
)
def pip._vendor.requests.cookies.RequestsCookieJar.update (   self,
  other 
)
Updates this jar with cookies from another CookieJar or dict-like
def pip._vendor.requests.cookies.RequestsCookieJar.values (   self)
Dict-like values() that returns a list of values of cookies from the jar.
See keys() and items().

Member Data Documentation

pip._vendor.requests.cookies.RequestsCookieJar._cookies_lock
private

The documentation for this class was generated from the following file:

Copyright 2014 Google Inc. All rights reserved.