Skip to main content

httpdex-cookies

RFC 6265 cookie parsing and storage. Zero dependencies.

Highlights

  • Parse Set-Cookie headers 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 scoping
  • CookieStore - domain/path-scoped cookie store with dict-like access
  • parse_set_cookie(header, request_url) - parse Set-Cookie header into a Cookie

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)

Source distribution for httpdex-cookies 0.1.0
File Size Uploaded
httpdex_cookies-0.1.0.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for httpdex-cookies 0.1.0
File Interpreter ABI Platform
httpdex_cookies-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / httpdex_cookies-0.1.0.tar.gz

Download URL httpdex_cookies-0.1.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
98b8f3d297c0e4ac339f3cd73121158c80b5ea1316db51bdb4212896db32b5f2
BLAKE2b-256 checksum
How to use checksums
001e2476f3f04e752c3e17af2565955e246352daa0fc7e40feb67f07d5ad7008
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / httpdex_cookies-0.1.0-py3-none-any.whl

Download URL httpdex_cookies-0.1.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81f01e4f7b8274d3c3eab843a2d739f65c5ba8eb486b67cfa27a490039c5b935
BLAKE2b-256 checksum
How to use checksums
ff9c26d0a558399337aea4ed4662639ea423920f77f4a6de4952a328649adf61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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