real_value, coded_value = value_encode(VALUE) Called prior to setting a cookie's value from the dictionary representation. The VALUE is the value being assigned. Override this function to modify the behavior of cookies.
http.cookies/BaseCookie.value_encode
BaseCookie.value_encode