Skip to main content

Mini Module for Parsing Cookies.

Project description

cookiesparser

GitHub GitHub release (latest by date) PyPI

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 hashes)

Uploaded Source

Built Distribution

cookiesparser-1.2-py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page