Skip to main content

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.

Installation

You can install cookiesparser using pip:

pip install cookiesparser

Usage

import cookiesparser as cparser

c = "token=xyz789; userId=42; color=blue;"
parsed = cparser.parse(c)
encoded = cparser.encode(parsed)
token = cparser.get_cookie(c, "token")
print(f"Orignal: {c}")
print(f"Parsed: {parsed}")
print(f"Encoded: {encoded}")
print(f"Token: {token}")

Output

Orignal: token=xyz789; userId=42; color=blue;
Parsed: {'token': 'xyz789', 'userId': '42'}
Encoded: token=xyz789; userId=42
Token: xyz789

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.

Metadata

Release files for cookiesparser 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cookiesparser 1.4.0
File Size Uploaded Provenance Actions
cookiesparser-1.4.0.tar.gz 7.0 kB With provenance Details for cookiesparser-1.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cookiesparser 1.4.0
File Interpreter ABI Platform Actions
cookiesparser-1.4.0-py3-none-any.whl Python 3 none any Details for cookiesparser-1.4.0-py3-none-any.whl

Total release size: 14.9 kB

Release files / cookiesparser-1.4.0.tar.gz

Download URL cookiesparser-1.4.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
52f6a3941c64020d654acb902063b5d6ca4d241874ec4a4704d243a4c6159bb0
BLAKE2b-256 checksum
How to use checksums
1a7464911da610dd96d1ced935e3ee9027e7bea3197728cfc5e800cf3902e2cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 1, 2025.

Transparency log

Release files / cookiesparser-1.4.0-py3-none-any.whl

Download URL cookiesparser-1.4.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b1f0feeab0ba0dc8a0d81bbed240e5ab8b82e50bae7f0a4dab4f902ba582711
BLAKE2b-256 checksum
How to use checksums
14f3ecff5849b37f90751f6cc7497be4b6c65e188b6424c150ed7c5eafa9e7ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 1, 2025.

Transparency log

Security for cookiesparser 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cookiesparser-1.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 1, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page