Skip to content

Values

nodekit.values.List

List = list[Value]

nodekit.values.Dict

Dict = dict[str, Value]

nodekit.values.LeafValue

LeafValue = bool | int | float | str

nodekit.values.Value

Value = LeafValue | List | Dict | None

nodekit.values.PixelSize

PixelSize = Annotated[
    int,
    Field(
        strict=True,
        ge=0,
        description="A spatial size in units of W3C reference pixels. ",
    ),
]

nodekit.values.PixelPoint

PixelPoint = Annotated[
    int,
    Field(
        strict=True,
        description="A spatial location relative to some origin, in units of W3C reference pixels.",
    ),
]

nodekit.values.TimeElapsedMsec

TimeElapsedMsec = Annotated[
    int,
    Field(
        strict=True,
        description="A time point, relative to some origin.",
    ),
]

nodekit.values.TimeDurationMsec

TimeDurationMsec = Annotated[
    int,
    Field(
        strict=True,
        ge=0,
        description="A duration of time in milliseconds, relative to the start of the Trace.",
    ),
]

nodekit.values.MarkdownString

MarkdownString = Annotated[
    str,
    Field(
        strict=True, description="Markdown-formatted string"
    ),
]

nodekit.values.ColorHexString

ColorHexString = Annotated[
    str,
    BeforeValidator(_normalize_hex_code),
    Field(
        pattern="^#[0-9a-fA-F]{8}$",
        min_length=9,
        max_length=9,
    ),
]

nodekit.values.PressableKey

PressableKey = Literal[
    "a",
    "b",
    "c",
    "d",
    "e",
    "f",
    "g",
    "h",
    "i",
    "j",
    "k",
    "l",
    "m",
    "n",
    "o",
    "p",
    "q",
    "r",
    "s",
    "t",
    "u",
    "v",
    "w",
    "x",
    "y",
    "z",
    "0",
    "1",
    "2",
    "3",
    "4",
    "5",
    "6",
    "7",
    "8",
    "9",
    "Enter",
    " ",
    "ArrowDown",
    "ArrowLeft",
    "ArrowRight",
    "ArrowUp",
]

nodekit.values.SHA256

SHA256 = Annotated[str, Field(pattern='^[a-f0-9]{64}$')]

A hex string representing a SHA-256 hash.

nodekit.values.ImageMediaType

ImageMediaType = Literal[
    "image/png", "image/svg+xml", "image/jpeg"
]

nodekit.values.VideoMediaType

VideoMediaType = Literal['video/mp4']

nodekit.values.MediaType

MediaType = ImageMediaType | VideoMediaType

nodekit.values.NodeId

NodeId = Annotated[
    str,
    Field(
        description="An identifier for a Node which is unique within a Graph."
    ),
]

nodekit.values.NodeAddress

NodeAddress = Annotated[
    list[NodeId],
    Field(
        description="The address of a Node within a Graph."
    ),
]

nodekit.values.RegisterId

RegisterId = Annotated[
    str,
    Field(
        description="An identifier for a Graph register."
    ),
]

nodekit.Region pydantic-model

Fields: