Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pip._vendor.requests.cookies.RequestsCookieJar Class Reference
Inheritance diagram for pip._vendor.requests.cookies.RequestsCookieJar:
Inheritance graph
[legend]
Collaboration diagram for pip._vendor.requests.cookies.RequestsCookieJar:
Collaboration graph
[legend]

Public Member Functions

 get (self, name, default=None, domain=None, path=None)
 
 set (self, name, value, **kwargs)
 
 iterkeys (self)
 
 keys (self)
 
 itervalues (self)
 
 values (self)
 
 iteritems (self)
 
 items (self)
 
 list_domains (self)
 
 list_paths (self)
 
 multiple_domains (self)
 
 get_dict (self, domain=None, path=None)
 
 __contains__ (self, name)
 
 __getitem__ (self, name)
 
 __setitem__ (self, name, value)
 
 __delitem__ (self, name)
 
 set_cookie (self, cookie, *args, **kwargs)
 
 update (self, other)
 
 __getstate__ (self)
 
 __setstate__ (self, state)
 
 copy (self)
 
 get_policy (self)
 

Protected Member Functions

 _find (self, name, domain=None, path=None)
 
 _find_no_duplicates (self, name, domain=None, path=None)
 

Protected 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.

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

Unlike a regular CookieJar, this class is pickleable.

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

Member Function Documentation

◆ __delitem__()

pip._vendor.requests.cookies.RequestsCookieJar.__delitem__ (   self,
  name 
)
Deletes a cookie given a name. Wraps ``cookielib.CookieJar``'s
``remove_cookie_by_name()``.

◆ __getitem__()

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.

.. warning:: operation is O(n), not O(1).

◆ __getstate__()

pip._vendor.requests.cookies.RequestsCookieJar.__getstate__ (   self)
Unlike a normal CookieJar, this class is pickleable.

◆ __setitem__()

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.

◆ __setstate__()

pip._vendor.requests.cookies.RequestsCookieJar.__setstate__ (   self,
  state 
)
Unlike a normal CookieJar, this class is pickleable.

◆ _find()

pip._vendor.requests.cookies.RequestsCookieJar._find (   self,
  name,
  domain = None,
  path = None 
)
protected
Requests uses this method internally to get cookie values.

If there are conflicting cookies, _find arbitrarily chooses one.
See _find_no_duplicates if you want an exception thrown if there are
conflicting cookies.

:param name: a string containing name of cookie
:param domain: (optional) string containing domain of cookie
:param path: (optional) string containing path of cookie
:return: cookie.value

◆ _find_no_duplicates()

pip._vendor.requests.cookies.RequestsCookieJar._find_no_duplicates (   self,
  name,
  domain = None,
  path = None 
)
protected
Both ``__get_item__`` and ``get`` call this function: it's never
used elsewhere in Requests.

:param name: a string containing name of cookie
:param domain: (optional) string containing domain of cookie
:param path: (optional) string containing path of cookie
:raises KeyError: if cookie is not found
:raises CookieConflictError: if there are multiple cookies
    that match name and optionally domain and path
:return: cookie.value

◆ copy()

pip._vendor.requests.cookies.RequestsCookieJar.copy (   self)
Return a copy of this RequestsCookieJar.

◆ get()

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.

.. warning:: operation is O(n), not O(1).

◆ get_dict()

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.

:rtype: dict

◆ get_policy()

pip._vendor.requests.cookies.RequestsCookieJar.get_policy (   self)
Return the CookiePolicy instance used.

◆ items()

pip._vendor.requests.cookies.RequestsCookieJar.items (   self)
Dict-like items() that returns a list of name-value tuples from the
jar. Allows client-code to call ``dict(RequestsCookieJar)`` and get a
vanilla python dict of key value pairs.

.. seealso:: keys() and values().

◆ iteritems()

pip._vendor.requests.cookies.RequestsCookieJar.iteritems (   self)
Dict-like iteritems() that returns an iterator of name-value tuples
from the jar.

.. seealso:: iterkeys() and itervalues().

◆ iterkeys()

pip._vendor.requests.cookies.RequestsCookieJar.iterkeys (   self)
Dict-like iterkeys() that returns an iterator of names of cookies
from the jar.

.. seealso:: itervalues() and iteritems().

◆ itervalues()

pip._vendor.requests.cookies.RequestsCookieJar.itervalues (   self)
Dict-like itervalues() that returns an iterator of values of cookies
from the jar.

.. seealso:: iterkeys() and iteritems().

◆ keys()

pip._vendor.requests.cookies.RequestsCookieJar.keys (   self)
Dict-like keys() that returns a list of names of cookies from the
jar.

.. seealso:: values() and items().

◆ list_domains()

pip._vendor.requests.cookies.RequestsCookieJar.list_domains (   self)
Utility method to list all the domains in the jar.

◆ list_paths()

pip._vendor.requests.cookies.RequestsCookieJar.list_paths (   self)
Utility method to list all the paths in the jar.

◆ multiple_domains()

pip._vendor.requests.cookies.RequestsCookieJar.multiple_domains (   self)
Returns True if there are multiple domains in the jar.
Returns False otherwise.

:rtype: bool

◆ set()

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.

◆ update()

pip._vendor.requests.cookies.RequestsCookieJar.update (   self,
  other 
)
Updates this jar with cookies from another CookieJar or dict-like

◆ values()

pip._vendor.requests.cookies.RequestsCookieJar.values (   self)
Dict-like values() that returns a list of values of cookies from the
jar.

.. seealso:: keys() and items().

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