OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | get (self, name, default=None, domain=None, path=None) |
def | set (self, name, value, **kwargs) |
def | iterkeys (self) |
def | keys (self) |
def | itervalues (self) |
def | values (self) |
def | iteritems (self) |
def | items (self) |
def | list_domains (self) |
def | list_paths (self) |
def | multiple_domains (self) |
def | get_dict (self, domain=None, path=None) |
def | __contains__ (self, name) |
def | __getitem__ (self, name) |
def | __setitem__ (self, name, value) |
def | __delitem__ (self, name) |
def | set_cookie (self, cookie, *args, **kwargs) |
def | update (self, other) |
def | __getstate__ (self) |
def | __setstate__ (self, state) |
def | copy (self) |
def | get_policy (self) |
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).
def __contains__ | ( | self, | |
name | |||
) |
def __delitem__ | ( | self, | |
name | |||
) |
Deletes a cookie given a name. Wraps ``cookielib.CookieJar``'s ``remove_cookie_by_name()``.
def __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).
def __getstate__ | ( | self | ) |
Unlike a normal CookieJar, this class is pickleable.
def __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 __setstate__ | ( | self, | |
state | |||
) |
Unlike a normal CookieJar, this class is pickleable.
def copy | ( | self | ) |
Return a copy of this RequestsCookieJar.
def 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).
def 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
def get_policy | ( | self | ) |
Return the CookiePolicy instance used.
def 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().
def iteritems | ( | self | ) |
Dict-like iteritems() that returns an iterator of name-value tuples from the jar. .. seealso:: iterkeys() and itervalues().
def iterkeys | ( | self | ) |
Dict-like iterkeys() that returns an iterator of names of cookies from the jar. .. seealso:: itervalues() and iteritems().
def itervalues | ( | self | ) |
Dict-like itervalues() that returns an iterator of values of cookies from the jar. .. seealso:: iterkeys() and iteritems().
def keys | ( | self | ) |
Dict-like keys() that returns a list of names of cookies from the jar. .. seealso:: values() and items().
def list_domains | ( | self | ) |
Utility method to list all the domains in the jar.
def list_paths | ( | self | ) |
Utility method to list all the paths in the jar.
def multiple_domains | ( | self | ) |
Returns True if there are multiple domains in the jar. Returns False otherwise. :rtype: bool
def 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 set_cookie | ( | self, | |
cookie, | |||
* | args, | ||
** | kwargs | ||
) |
def update | ( | self, | |
other | |||
) |
Updates this jar with cookies from another CookieJar or dict-like
def values | ( | self | ) |
Dict-like values() that returns a list of values of cookies from the jar. .. seealso:: keys() and items().