PyMOTW: Cookie

The Cookie module defines classes for parsing and creating HTTP cookie headers. Cookies have been a part of the HTTP protocol for a long time. All of the modern web development frameworks provide easy access to cookies so a programmer almost never has to worry about how to format them or make sure the headers are sent properly. It can be instructive to understand how cookies work, though, and the options available.

Read more at pymotw.com: Cookie