httpdex-cookies
RFC 6265 cookie parsing and storage. Zero dependencies.
Highlights
- Parse
Set-Cookieheaders with domain validation and public suffix rejection - Domain/path/secure scoping per RFC 6265
- Host-only cookies (no Domain attribute) restricted to exact origin
- Default-path computation per RFC 6265 Section 5.1.4
Usage
from httpdex_cookies import CookieStore, parse_set_cookie
# Parse a Set-Cookie header
cookie = parse_set_cookie("session=abc; Path=/; Secure", "https://example.com/")
# Store and retrieve cookies
store = CookieStore()
store.extract_cookies("https://example.com/", [("set-cookie", "session=abc")])
header = store.get_cookie_header("https://example.com/api") # "session=abc"
Public API
Cookie- single cookie with domain/path/secure/expiry scopingCookieStore- domain/path-scoped cookie store with dict-like accessparse_set_cookie(header, request_url)- parse Set-Cookie header into aCookie
Metadata
Release files for httpdex-cookies 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| httpdex_cookies-0.1.0.tar.gz | 5.6 kB | Without provenance | Details for httpdex_cookies-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| httpdex_cookies-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for httpdex_cookies-0.1.0-py3-none-any.whl |
Total release size: 12.2 kB
Security for httpdex-cookies 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.