Picker server reference¶
The published server reference renders the Python signatures and docstrings below. For configuration and client mounts, use the integration guide.
server
¶
Serve the stack's theme preference using only the Python standard library.
Theme
¶
Bases: TypedDict
A named palette and its representative gallery colors.
Addon
¶
Bases: TypedDict
An optional visual change for a specific group of apps.
Catalog
¶
Bases: TypedDict
Metadata bundled and tested with the offline picker.
Selection
¶
Bases: NamedTuple
One preference shared by the apps in this generated project.
PickerHandler
¶
Bases: BaseHTTPRequestHandler
Serve a small same-origin UI; only a JSON POST can change the theme.
respond
¶
Send a complete, non-cacheable response with an explicit content type.
json_response
¶
json_response(
status: int,
**fields: str
| tuple[str, ...]
| list[str]
| list[Theme]
| list[Addon]
| None,
) -> None
Use the same response format for updates and validation failures.
available_apps
¶
Report the supported apps selected in this deployment.
read_selection
¶
read_selection(selection: Path) -> Selection
Accept only the exact local imports the picker can write.
save_theme
¶
save_theme(
selection: Path,
theme: str,
addons: tuple[str, ...] = (),
*,
only_if_missing: bool = False,
) -> None
Atomically publish a palette and all its add-ons in one complete stylesheet.
trusted_host
¶
Allow local names, literal addresses, or an explicitly configured DNS hostname.