cbd0adca91
Stateful FastAPI lab with contract packs, Compose/Helm, Docker Hub release targets, and Pulumi coverage across all Engine series (GET/POST/PUT/DELETE/HEAD).
21 lines
454 B
Python
21 lines
454 B
Python
"""Static web console assets."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
_WEB_ROOT = Path(__file__).parent
|
|
_CONSOLE_HTML = _WEB_ROOT / "index.html"
|
|
_STATIC = _WEB_ROOT / "static"
|
|
|
|
|
|
def console_html() -> str:
|
|
"""Return the latest console markup from disk."""
|
|
|
|
return _CONSOLE_HTML.read_text(encoding="utf-8")
|
|
|
|
|
|
def static_path(name: str) -> Path | None:
|
|
path = _STATIC / name
|
|
return path if path.is_file() else None
|