Skip to content

Source

🛈 DocStrings

A resolved input.

Source code in src/framesheet/sources.py
@dataclass
class Source:
    """A resolved input."""

    label: str
    """What the user passed (path, ``-`` or URL)."""
    kind: SourceKind
    url: str
    """What the browser navigates to."""
    text: str | None
    """Source text if available locally (used for static checks and size detection)."""
    media: bytes | None = None
    """Video/animated image bytes (``kind == "video"``), served to the wrapper page."""
    container: str | None = None
    """Video container (``mp4``, ``webm``, ``gif``, ...) for video sources."""

container class-attribute instance-attribute

container: str | None = None

Video container (mp4, webm, gif, ...) for video sources.

label instance-attribute

label: str

What the user passed (path, - or URL).

media class-attribute instance-attribute

media: bytes | None = None

Video/animated image bytes (kind == "video"), served to the wrapper page.

text instance-attribute

text: str | None

Source text if available locally (used for static checks and size detection).

url instance-attribute

url: str

What the browser navigates to.

:fa-brands-github: Show source on GitHub