WindowsOptions
Presentation settings for Windows toast notifications.
URI and file values refer to resources available on the Windows device, not files on the Python server. Windows version and packaging determine which toast features are available.
Properties
bindings- Substitution values for named bindings in Windows toast content.duration- Requested toast display duration.header- Header text used to group Windows notifications.images- Image URI strings to include in the toast.loop_sound- Whethersoundrepeats until the notification is dismissed.progress- Progress bar shown in the toast.scenario- Toast scenario controlling layout and default audio; seeWindowsScenario.sound- The sound to be played when the toast is displayed.subtitle- Additional text line displayed below the notification body.timestamp- Time displayed on the toast.
Properties
bindingsclass-attributeinstance-attribute
bindings: dict[str, str] | None = NoneSubstitution values for named bindings in Windows toast content.
Keys identify bindings and values provide the text to substitute. These values do not create additional rows or progress bars by themselves.
durationclass-attributeinstance-attribute
duration: WindowsDuration | None = NoneRequested toast display duration.
See WindowsDuration. The scenario
and Windows settings can influence the actual duration.
headerclass-attributeinstance-attribute
header: str | None = NoneHeader text used to group Windows notifications.
Sets the visible title of a header with the fixed ID "header" and no activation
arguments.
imagesclass-attributeinstance-attribute
images: list[str] | None = NoneImage URI strings to include in the toast.
Use URIs accessible to Windows, such as file:///C:/images/status.png. Images use
default placement and empty alternative text.
loop_soundclass-attributeinstance-attribute
loop_sound: bool | None = NoneWhether sound repeats until the notification is dismissed.
Windows loops sound only for notifications that stay on screen: those with
a scenario of ALARM,
REMINDER or
INCOMING_CALL, or a long
duration. Use it with the alarm and call sounds, which are made to
loop.
progressclass-attributeinstance-attribute
progress: WindowsProgress | None = NoneProgress bar shown in the toast.
scenarioclass-attributeinstance-attribute
scenario: WindowsScenario | None = NoneToast scenario controlling layout and default audio; see WindowsScenario.
soundclass-attributeinstance-attribute
sound: WindowsSound | None = NoneThe sound to be played when the toast is displayed.
Custom audio URIs and arbitrary ms-winsoundevent names are not supported.
subtitleclass-attributeinstance-attribute
subtitle: str | None = NoneAdditional text line displayed below the notification body.
timestampclass-attributeinstance-attribute
timestamp: datetime | None = NoneTime displayed on the toast.
Overrides the displayed time without changing when the notification is delivered.
None uses the system's posting time.
Timezone-aware values preserve their instant. A naive datetime is interpreted in the Python host's local timezone.