http.cookies.BaseCookie.load()

BaseCookie.load(rawdata) If rawdata is a string, parse it as an HTTP_COOKIE and add the values found there as Morsels. If it is a dictionary, it is equivalent to: for k, v in rawdata.items(): cookie[k] = v

http.cookies.BaseCookie.output()

BaseCookie.output(attrs=None, header='Set-Cookie:', sep='\r\n') Return a string representation suitable to be sent as HTTP headers. attrs and header are sent to each Morsel‘s output() method. sep is used to join the headers together, and is by default the combination '\r\n' (CRLF).

http.cookies.BaseCookie.js_output()

BaseCookie.js_output(attrs=None) Return an embeddable JavaScript snippet, which, if run on a browser which supports JavaScript, will act the same as if the HTTP headers was sent. The meaning for attrs is the same as in output().

http.cookies.Morsel

class http.cookies.Morsel Abstract a key/value pair, which has some RFC 2109 attributes. Morsels are dictionary-like objects, whose set of keys is constant — the valid RFC 2109 attributes, which are expires path comment domain max-age secure version httponly The attribute httponly specifies that the cookie is only transferred in HTTP requests, and is not accessible through JavaScript. This is intended to mitigate some forms of cross-site scripting. The keys are case-insensitive and their d

http.cookies.CookieError

exception http.cookies.CookieError Exception failing because of RFC 2109 invalidity: incorrect attributes, incorrect Set-Cookie header, etc.

http.cookies.BaseCookie

class http.cookies.BaseCookie([input]) This class is a dictionary-like object whose keys are strings and whose values are Morsel instances. Note that upon setting a key to a value, the value is first converted to a Morsel containing the key and the value. If input is given, it is passed to the load() method.

http.cookiejar.FileCookieJar.save()

FileCookieJar.save(filename=None, ignore_discard=False, ignore_expires=False) Save cookies to a file. This base class raises NotImplementedError. Subclasses may leave this method unimplemented. filename is the name of file in which to save cookies. If filename is not specified, self.filename is used (whose default is the value passed to the constructor, if any); if self.filename is None, ValueError is raised. ignore_discard: save even cookies set to be discarded. ignore_expires: save even co

http.cookiejar.LWPCookieJar

class http.cookiejar.LWPCookieJar(filename, delayload=None, policy=None) A FileCookieJar that can load from and save cookies to disk in format compatible with the libwww-perl library’s Set-Cookie3 file format. This is convenient if you want to store cookies in a human-readable file.

http.cookiejar.LoadError

exception http.cookiejar.LoadError Instances of FileCookieJar raise this exception on failure to load cookies from a file. LoadError is a subclass of OSError. Changed in version 3.3: LoadError was made a subclass of OSError instead of IOError.

http.cookiejar.MozillaCookieJar

class http.cookiejar.MozillaCookieJar(filename, delayload=None, policy=None) A FileCookieJar that can load from and save cookies to disk in the Mozilla cookies.txt file format (which is also used by the Lynx and Netscape browsers). Note This loses information about RFC 2965 cookies, and also about newer or non-standard cookie-attributes such as port. Warning Back up your cookies before saving if you have cookies whose loss / corruption would be inconvenient (there are some subtleties whic