Cookie.SimpleCookie¶
-
class
Cookie.SimpleCookie(input=None)[source]¶ SimpleCookie supports strings as cookie values. When setting the value using the dictionary assignment notation, SimpleCookie calls the builtin str() to convert the value to a string. Values received from HTTP are kept as strings.
Methods¶
_BaseCookie__ParseString(str[, patt]) |
|
_BaseCookie__set(key, real_value, coded_value) |
Private method for setting a cookie’s value |
__contains__((k) -> True if D has a key k, ...) |
|
__format__ |
default object formatter |
__getitem__ |
x.__getitem__(y) <==> x[y] |
__init__([input]) |
|
__new__((S, ...) |
|
__reduce__ |
helper for pickle |
__reduce_ex__ |
helper for pickle |
__repr__() |
|
__setitem__(key, value) |
Dictionary style assignment. |
__sizeof__(() -> size of D in memory, in bytes) |
|
__str__([attrs, header, sep]) |
Return a string suitable for HTTP. |
__subclasshook__ |
Abstract classes can override this to customize issubclass(). |
clear(() -> None. Remove all items from D.) |
|
copy(() -> a shallow copy of D) |
|
fromkeys(...) |
v defaults to None. |
get((k[,d]) -> D[k] if k in D, ...) |
|
has_key((k) -> True if D has a key k, else False) |
|
items(() -> list of D’s (key, value) pairs, ...) |
|
iteritems(() -> an iterator over the (key, ...) |
|
iterkeys(() -> an iterator over the keys of D) |
|
itervalues(...) |
|
js_output([attrs]) |
Return a string suitable for JavaScript. |
keys(() -> list of D’s keys) |
|
load(rawdata) |
Load cookies from a string (presumably HTTP_COOKIE) or from a dictionary. |
output([attrs, header, sep]) |
Return a string suitable for HTTP. |
pop((k[,d]) -> v, ...) |
If key is not found, d is returned if given, otherwise KeyError is raised |
popitem(() -> (k, v), ...) |
2-tuple; but raise KeyError if D is empty. |
setdefault((k[,d]) -> D.get(k,d), ...) |
|
update(([E, ...) |
If E present and has a .keys() method, does: for k in E: D[k] = E[k] |
value_decode(val) |
|
value_encode(val) |
|
values(() -> list of D’s values) |
|
viewitems(...) |
|
viewkeys(...) |
|
viewvalues(...) |