Option
option ¶
Functionality for general Notion objects like texts, files, options, etc.
Option(name: str, *, color: Color | str | UnsetType = Unset) ¶
Option for select & multi-select property.
OptionGroup(group_type: OptionGroupType | str, options: list[Option]) ¶
Group of options for status property.
name: str property ¶
Name of the option group.
options: list[Option] property ¶
Options within this option group.
__eq__(other: object) -> bool ¶
__hash__() -> int ¶
__repr__() -> str ¶
__str__() -> str ¶
wrap_obj_ref(obj_ref: obj_core.GenericObject, /, *, options: list[Option] | None = None) -> OptionGroup classmethod ¶
Convienence constructor for the group of options.
OptionNS ¶
Option namespace to simplify working with (Multi-)Select options.
OptionNSType ¶
Metaclass providing class-level operations for OptionNS namespaces.
These operate on the namespace class itself, not on instances of it, so they live on the metaclass. Typing the receiver this way (rather than annotating cls as type[OptionNS]) lets mypy resolve the methods without a type: ignore.
check_for_updates(old: list[Option], new: list[Option]) -> dict[str, list[str]] ¶
Check if two lists of options contain updates.
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 as this is not supported by the Notion API.