class StringCookieJar(CookieJar):

    def __init__(self, string=None, policy=None):
        CookieJar.__init__(self, policy)
if string:
    self._cookies = pickle.loads(string)

def dump(self):
    pass
Storing cookielib cookies in a database