Low level API for handling cookies server side.
pip install biscuits
# Parse a "Cookie:" header value:
from biscuits import parse
parse('some=value; and=more')
> {'some': 'value', 'and': 'more'}
# Generate a "Set-Cookie:" header value:
from biscuits import Cookie
cookie = Cookie(name='foo', value='bar', domain='www.example.org')
str(cookie)
> "foo=bar; Domain=www.example.org; Path=/"
pip install cython
make compile
python setup.py develop
make test
See Benchmark for more details.
- unescape antislash when parsing to be consistent with quoting (cf #3)
- unescape octal ascii when parsing to be consistent with quoting (cf #4)
- add support for the SameSite attribute (cf #8)