Props
props ¶
Property values of a page in Notion directly mapped to Python objects.
PropertyValue objects are directly returned from the Notion API using the retrieve a page endpoint. They are used to represent the values of a page's properties. In contrast the PropertyItem objects are returned from the retrieve a page property item endpoint and differ from the PropertyValue objects by having a field object = 'property_item'. So they are considered proper objects in the Notion API instead of just types like the PropertyValue objects.
MAX_ITEMS_PER_PROPERTY = 25 module-attribute ¶
Maximum number of items rertrieved per property.
Only a certain number of items for each property are retrieved by default. The high-level API will retrieve the rest on demand automatically.
Source: https://developers.notion.com/reference/retrieve-a-page
PAGINATED_PROP_VALS = (RichText, Title, People, Relation, Rollup) module-attribute ¶
BooleanFormula ¶
A Notion boolean formula result.
boolean: bool | None = None class-attribute instance-attribute ¶
Button ¶
ButtonPropertyItem ¶
A PropertyItem returned by the Notion API containing the Button property.
Checkbox ¶
Simple checkbox type; represented as a boolean.
checkbox: bool | None = None class-attribute instance-attribute ¶
CheckboxPropertyItem ¶
A PropertyItem returned by the Notion API containing the Checkbox property.
CreatedBy ¶
A Notion created-by property value.
created_by: SerializeAsAny[User] instance-attribute ¶
CreatedByPropertyItem ¶
A PropertyItem returned by the Notion API containing the CreatedBy property.
CreatedTimePropertyItem ¶
A PropertyItem returned by the Notion API containing the CreatedTime property.
Date ¶
DateFormula ¶
A Notion date formula result.
date: DateRange | None = None class-attribute instance-attribute ¶
DatePropertyItem ¶
A PropertyItem returned by the Notion API containing the Date property.
EmailPropertyItem ¶
A PropertyItem returned by the Notion API containing the Email property.
Files ¶
Notion files type.
files: list[SerializeAsAny[FileObject]] = Field(default_factory=list) class-attribute instance-attribute ¶
FilesPropertyItem ¶
A FilesPropertyItem returned by the Notion API containing the Files property.
Formula ¶
A Notion formula property value.
formula: SerializeAsAny[FormulaResult] | None = None class-attribute instance-attribute ¶
FormulaPropertyItem ¶
A PropertyItem returned by the Notion API containing the Formula property.
FormulaResult ¶
A Notion formula result.
This object contains the result of the expression in the database properties.
LastEditedBy ¶
A Notion last-edited-by property value.
last_edited_by: SerializeAsAny[User] instance-attribute ¶
LastEditedByPropertyItem ¶
A PropertyItem returned by the Notion API containing the LastEditedBy property.
LastEditedTime ¶
A Notion last-edited-time property value.
last_edited_time: dt.datetime instance-attribute ¶
LastEditedTimePropertyItem ¶
A PropertyItem returned by the Notion API containing the LastEditedTime property.
MultiSelect ¶
Notion multi-select type.
multi_select: list[SelectOption] = Field(default_factory=list) class-attribute instance-attribute ¶
MultiSelectPropertyItem ¶
A PropertyItem returned by the Notion API containing the MultiSelect property.
NumberFormula ¶
A Notion number formula result.
number: float | int | None = None class-attribute instance-attribute ¶
NumberPropertyItem ¶
A PropertyItem returned by the Notion API containing the Number property.
People ¶
PeoplePropertyItem ¶
A PropertyItem returned by the Notion API containing the People property.
people: User instance-attribute ¶
PhoneNumber ¶
Notion phone type.
phone_number: str | None = None class-attribute instance-attribute ¶
PhoneNumberPropertyItem ¶
A PropertyItem returned by the Notion API containing the PhoneNumber property.
PropertyItem ¶
A PropertyItem returned by the Notion API.
Basic property items have a similar schema to corresponding property values.
Notion-API: https://developers.notion.com/reference/property-item-object
id: str instance-attribute ¶
PropertyValue ¶
Base class for Notion property values.
id: str | UnsetType = Unset class-attribute instance-attribute ¶
build(value: Any) -> Self classmethod ¶
Build the property value from given value, e.g. native Python or nested type.
In practice, this is like calling init with the corresponding keyword.
serialize_for_api() -> dict[str, Any] ¶
Serialize the object for sending it to the Notion API.
Relation ¶
RelationPropertyItem ¶
A PropertyItem returned by the Notion API containing many Relation properties.
relation: ObjectRef instance-attribute ¶
RichText ¶
Notion rich text type.
rich_text: list[SerializeAsAny[RichTextBaseObject]] = Field(default_factory=list) class-attribute instance-attribute ¶
RichTextPropertyItem ¶
A PropertyItem returned by the Notion API containing the RichText property.
rich_text: SerializeAsAny[RichTextBaseObject] instance-attribute ¶
Rollup ¶
A Notion rollup property value.
rollup: SerializeAsAny[RollupObject] | None = None class-attribute instance-attribute ¶
RollupArray ¶
A Notion rollup array property value.
array: list[SerializeAsAny[PropertyValue]] instance-attribute ¶
RollupDate ¶
A Notion rollup date property value.
date: DateRange | None = None class-attribute instance-attribute ¶
RollupIncomplete ¶
RollupNumber ¶
A Notion rollup number property value.
number: float | int | None = None class-attribute instance-attribute ¶
RollupObject ¶
A Notion rollup property value.
function: AggFunc | None = None class-attribute instance-attribute ¶
RollupPropertyItem ¶
A PropertyItem returned by the Notion API containing the Rollup property.
RollupUnsupported ¶
Select ¶
Notion select type.
select: SelectOption | None = None class-attribute instance-attribute ¶
SelectPropertyItem ¶
A PropertyItem returned by the Notion API containing the Select property.
Status ¶
Notion status property.
status: SelectOption | None = None class-attribute instance-attribute ¶
StatusPropertyItem ¶
A PropertyItem returned by the Notion API containing the Status property.
StringFormula ¶
A Notion string formula result.
string: str | None = None class-attribute instance-attribute ¶
Title ¶
Notion title type.
title: list[SerializeAsAny[RichTextBaseObject]] = Field(default_factory=list) class-attribute instance-attribute ¶
TitlePropertyItem ¶
A PropertyItem returned by the Notion API containing the Title property.
title: SerializeAsAny[RichTextBaseObject] instance-attribute ¶
URLPropertyItem ¶
A PropertyItem returned by the Notion API containing the URL property.
UniqueID ¶
UniqueIDPropertyItem ¶
A PropertyItem returned by the Notion API containing the UniqueID property.
Verification ¶
A Notion verification property value.
verification: TypeData = Field(default_factory=TypeData) class-attribute instance-attribute ¶
VerificationPropertyItem ¶
A PropertyItem returned by the Notion API containing the Verification property.