bareutils.cookies
module bareutils.cookies ¶
Summary¶
Cookies
function bareutils.cookies.decode_cookies ¶
Summary¶
Decode a cookie header
function bareutils.cookies.decode_set_cookie ¶
Summary¶
Decode a set-cookie header into a dictionary.
Description¶
The max-age value is represented as a datatime.timedelta.
The expires value is represented as a datetine.datetime.
The secure value is represented as a bool.
function bareutils.cookies.encode_cookies ¶
Summary¶
Encode the cookie header
function bareutils.cookies.encode_set_cookie ¶
Summary¶
Encode set-cookie
Parameters¶
name: bytesThe cookie name
The cookie value
The time the cookie expires. Defaults to None.
The maximum age of the cookie in seconds. Defaults to None.
The cookie path. Defaults to None.
The cookie domain. Defaults to None.
Indicates if the cookie is restricted to https. Defaults to False.
Indicates if the cookie is available to the API. Defaults to False.
CORS directive. Defaults to None.
function bareutils.cookies.make_cookie ¶
Summary¶
Make a set-cookie header
Parameters¶
key: bytesThe cookie name
The cookie value
The expiry time of the cookie. Defaults to None.
The cookie path. Defaults to None.
The cookie domain. Defaults to None.
Indicates if the cookie is restricted to https. Defaults to False.
Indicates if the cookie is available to the API. Defaults to False.
CORS directive. Defaults to None.
function bareutils.cookies.make_expired_cookie ¶
Summary¶
Make an expired cookie