HTTP Cookie.
This class represents both Netscape and RFC 2965 cookies.
This is deliberately a very simple class. It just holds attributes. It's possible to construct Cookie instances that don't comply with the cookie standards. CookieJar.make_cookies is the factory function for Cookie objects -- it deals with cookie parsing, supplying defaults, and normalising to the representation used in this class. CookiePolicy is responsible for checking them to see whether they should be accepted from and returned to the server.
version: integer; name: string; value: string (may be None); port: string; None indicates no attribute was supplied (eg. "Port", rather than eg. "Port=80"); otherwise, a port string (eg. "80") or a port list string (eg. "80,8080") port_specified: boolean; true if a value was supplied with the Port cookie-attribute domain: string; domain_specified: boolean; true if Domain was explicitly set domain_initial_dot: boolean; true if Domain as set in HTTP header by server started with a dot (yes, this really is necessary!) path: string; path_specified: boolean; true if Path was explicitly set secure: boolean; true if should only be returned over secure connection expires: integer; seconds since epoch (RFC 2965 cookies should calculate this value from the Max-Age attribute) discard: boolean, true if this is a session cookie; (if no expires value, this should be true) comment: string; comment_url: string; rfc2109: boolean; true if cookie arrived in a Set-Cookie: (not Set-Cookie2:) header, but had a version cookie-attribute of 1 rest: mapping of other cookie-attributes
Note that the port may be present in the headers, but unspecified ("Port" rather than"Port=80", for example); if this is the case, port is None.
There are no base classes.
There are no implemented interfaces.
There are no attributes in this class.
get_nonstandard_attr(name, default=None)
has_nonstandard_attr(name)
is_expired(now=None)
nonstandard_attr_keys()
set_nonstandard_attr(name, value)
There are no known subclasses.