Skip to content

Props

props

Property values of a page in Notion directly mapped to Python 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

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.

CreatedTime

A Notion created-time property value.

created_time: dt.datetime instance-attribute

CreatedTimePropertyItem

A PropertyItem returned by the Notion API containing the CreatedTime property.

Date

Notion complex date type - may include timestamp and/or be a date range.

date: DateRange | None = None class-attribute instance-attribute

build(dt_spec: str | dt.datetime | dt.date | pnd.Interval) classmethod

Create a new Date from the native values.

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.

Email

Notion email type.

email: str | None = None class-attribute instance-attribute

EmailPropertyItem

A PropertyItem returned by the Notion API containing the Email property.

Files

Notion files type.

files: list[SerializeAsAny[FileObject]] = None class-attribute instance-attribute

FilesPropertyItem

A FilesPropertyItem returned by the Notion API containing the Files property.

Formula

A Notion formula property value.

formula: 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] = None class-attribute instance-attribute

MultiSelectPropertyItem

A PropertyItem returned by the Notion API containing the MultiSelect property.

Number

Simple number type.

number: float | int | None = None class-attribute instance-attribute

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

Notion people type.

people: list[User] = None class-attribute instance-attribute

serialize() -> dict[str, Any]

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 = None class-attribute instance-attribute

build(value) 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()

Serialize the object for sending it to the Notion API.

Relation

A Notion relation property value.

has_more: bool = False class-attribute instance-attribute

relation: list[ObjectRef] = None class-attribute instance-attribute

build(pages) classmethod

Return a Relation property with the specified pages.

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]] = None 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

A Notion incomplete rollup property value.

incomplete: TypeData instance-attribute

TypeData

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

A Notion unsupported rollup property value.

unsupported: TypeData instance-attribute

TypeData

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]] = None class-attribute instance-attribute

TitlePropertyItem

A PropertyItem returned by the Notion API containing the Title property.

title: SerializeAsAny[RichTextBaseObject] instance-attribute

URL

Notion URL type.

url: str | None = None class-attribute instance-attribute

URLPropertyItem

A PropertyItem returned by the Notion API containing the URL property.

UniqueID

A Notion unique-id property value.

unique_id: TypeData = TypeData() class-attribute instance-attribute

TypeData

number: int = 0 class-attribute instance-attribute
prefix: str | None = None class-attribute instance-attribute

UniqueIDPropertyItem

A PropertyItem returned by the Notion API containing the UniqueID property.

Verification

A Notion verification property value.

verification: TypeData = TypeData() class-attribute instance-attribute

TypeData

date: dt.datetime | None = None class-attribute instance-attribute
state: VState = VState.UNVERIFIED class-attribute instance-attribute
verified_by: SerializeAsAny[User] | None = None class-attribute instance-attribute
validate_enum_field(field: str) classmethod

VerificationPropertyItem

A PropertyItem returned by the Notion API containing the Verification property.