Mini Module for Parsing Cookies.
Project description
cookiesparser
Description
cookiesparser is a Mini Module for Parsing Cookies.
Installation
You can install cookiesparser using pip:
pip install cookiesparser
Usage
from cookiesparser import (parse, encode_cookies)
c = "foo=bar; id=191002929; key=avjwowuejbnwoqo; bar=foo;"
parsed = parse(c)
encoded = encode_cookies(parsed)
print("Orignal: %s" % (c))
print("Parsed: %s" % (parsed))
print("Encoded: %s" % (encoded))
Output
Orignal: foo=bar; id=191002929; key=avjwowuejbnwoqo; bar=foo;
Parsed: {'foo': 'bar', 'id': '191002929', 'key': 'avjwowuejbnwoqo', 'bar': 'foo'}
Encoded: foo=bar; id=191002929; key=avjwowuejbnwoqo; bar=foo
Contributing
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository.
License
cookiesparser is released under the Apache License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cookiesparser-1.2.tar.gz
(6.5 kB
view details)