Option
option
¶
Functionality for general Notion objects like texts, files, options, etc.
Option(name: str, *, color: Color | str | None = None)
¶
Option for select & multi-select property.
OptionGroup(*args: Any, **kwargs: Any)
¶
Group of options for status property.
OptionNS
¶
Option namespace to simplify working with (Multi-)Select options.
to_list() -> list[Option]
classmethod
¶
Convert the enum to a list as needed by the (Multi)Select property types.
OptionNSType
¶
Metaclass to implement len
for type OptionNS
itself, not an instance of it.
__len__()
¶
compare_options(old: list[Option], new: list[Option]) -> dict[str, list[str]]
¶
Compare two lists of options by their name, ignoring the id.
Returns which attributes have changed for each option. This is mainly used to check if options have changed when updating a select or multi-select property.