Skip to content

Icon

Base classes

Name Children Inherits
AnnotatedObject
aclientp.schema.v2.base
A v2 object with the ``_meta`` extension point.

⋔ Inheritance diagram

graph TD
  95970868877088["common.Icon"]
  95970868359040["base.AnnotatedObject"]
  95970855946400["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970868359040 --> 95970868877088
  95970855946400 --> 95970868359040
  95970851503232 --> 95970855946400
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: AnnotatedObject

An optionally sized icon a user interface can display.

Source code in src/aclientp/schema/v2/common.py
class Icon(AnnotatedObject):
    """An optionally sized icon a user interface can display."""

    src: str
    """URI of the icon. MUST be an ``https:`` or ``data:`` URI."""

    mime_type: MediaType | MISSING | None = MISSING
    """MIME type override, if the source's type is missing or generic."""

    sizes: Sequence[str] | MISSING | None = MISSING
    """Sizes the icon can be used at, each ``WxH`` (e.g. ``48x48``) or ``any``."""

    theme: IconTheme | MISSING | None = MISSING
    """Theme the icon is designed for; omitted means not theme-specific."""

mime_type class-attribute instance-attribute

mime_type: MediaType | MISSING | None = MISSING

MIME type override, if the source's type is missing or generic.

sizes class-attribute instance-attribute

sizes: Sequence[str] | MISSING | None = MISSING

Sizes the icon can be used at, each WxH (e.g. 48x48) or any.

src instance-attribute

src: str

URI of the icon. MUST be an https: or data: URI.

theme class-attribute instance-attribute

theme: IconTheme | MISSING | None = MISSING

Theme the icon is designed for; omitted means not theme-specific.

:fa-brands-github: Show source on GitHub