http.cookies

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

Cookie parsing and SetCookie serialization.

Consolidates the read side (parse_cookies, used by Request) and the write side (SetCookie, used by Response) in one module.

Cookie parsing and SetCookie serialization.

Consolidates the read side (parse_cookies, used by Request) and the write side (SetCookie, used by Response) in one module.

http.cookies

Name Type Default Description
type
qualified_name
element_type
description
source_file
line_number
is_autodoc
autodoc_element
_autodoc_template
_autodoc_url_path
_autodoc_page_type
title
doc_content_hash

Symbols on this page

parse_cookies
function
def parse_cookies(header: str) -> dict[str, str]

Parse aCookieheader value into a name-value dict.

Returns an empty dict for empty or missing headers.

Parameters

Name Type Default Description
header str
SetCookie
class

ASet-Cookiedirective attached to a Response.

View source · /home/runner/work/chirp/chirp/site/../src/chirp/http/cookies.py:1