Skip to main content

cookiesparser is a mini module for parsing cookies.

Project description

cookiesparser

GitHub GitHub release (latest by date) PyPI

Description

cookiesparser is a mini module for parsing cookies 🍪✨. This basic but super useful tool allows you to easily extract and encode cookies from strings, making your coding journey a little sweeter!

Installation

You can install cookiesparser using pip:

pip install cookiesparser

Usage

import cookiesparser as cparser

c = "foo=bar; id=191002929; key=avjwowuejbnwoqo; bar=foo;"
parsed = cparser.parse(c)
encoded = cparser.encode(parsed)

print(f"Orignal: {c}")
print(f"Parsed: {parsed}")
print("Encoded: {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.3.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

cookiesparser-1.3-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file cookiesparser-1.3.tar.gz.

File metadata

  • Download URL: cookiesparser-1.3.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cookiesparser-1.3.tar.gz
Algorithm Hash digest
SHA256 0771d751dc124995dd06032921e75d568f746d1b67c8fc2e37b541652cbd7494
MD5 f6445f82e8f01d46a1a4edfcc66676dd
BLAKE2b-256 c74c4a42a62106332f7ff99a7a76c5c9a240fe96c69b4616917514d99c89b902

See more details on using hashes here.

File details

Details for the file cookiesparser-1.3-py3-none-any.whl.

File metadata

  • Download URL: cookiesparser-1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cookiesparser-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 da73f90657c7c9ac67b615ec0e421fd9220fffcf114d4f2808900a3b214da8d6
MD5 efd46c8550bebaeb89ed28e1f13ec770
BLAKE2b-256 cda2658ca0b5d975e53c974b3e8ff3e4a5f015565889e6ae97d5eac21cfa2469

See more details on using hashes here.

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