Skip to main content

CookieParam

Dictionary representation of cookies for SessionCookies.set method.

Index

Properties

domain

domain: NotRequired[str]

Domain for which the cookie is set.

expires

expires: NotRequired[int]

Expiration date for the cookie, None for a session cookie.

http_only

http_only: NotRequired[bool]

Set the HttpOnly flag for the cookie.

name

name: Required[str]

Cookie name.

path

path: NotRequired[str]

Path on the specified domain for which the cookie is set.

same_site

same_site: NotRequired[Literal[Lax, None, Strict]]

Set the SameSite attribute for the cookie.

secure

secure: NotRequired[bool]

Set the Secure flag for the cookie.

value

value: Required[str]

Cookie value.