Skip to content

Props

props

Wrapper for property values of pages

DateType: TypeAlias = dt_date | tuple[dt_date, dt_date] module-attribute

BooleanFormula

A Notion boolean formula result.

boolean: bool | None = None class-attribute instance-attribute

value property

Checkbox

Simple checkbox type; represented as a boolean.

checkbox: bool | None = None class-attribute instance-attribute

CreatedBy

A Notion created-by property value.

created_by: SerializeAsAny[User] instance-attribute

CreatedTime

A Notion created-time property value.

created_time: datetime instance-attribute

Date

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

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

build(start: dt_date | None, end: dt_date | None = None) classmethod

Create a new Date from the native values.

DateFormula

A Notion date formula result.

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

value: None | DateType property

Email

Notion email type.

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

Files

Notion files type.

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

Formula

A Notion formula property value.

formula: FormulaResult | None = None class-attribute instance-attribute

FormulaResult

A Notion formula result.

This object contains the result of the expression in the database properties.

value abstractmethod property

Return the result of this FormulaResult.

LastEditedBy

A Notion last-edited-by property value.

last_edited_by: SerializeAsAny[User] instance-attribute

LastEditedTime

A Notion last-edited-time property value.

last_edited_time: datetime instance-attribute

MultiSelect

Notion multi-select type.

multi_select: list[SelectOption] = None class-attribute instance-attribute

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

value property

People

Notion people type.

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

serialize() -> dict[str, Any]

PhoneNumber

Notion phone type.

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

PropertyItem

A PropertyItem returned by the Notion API.

Basic property items have a similar schema to corresponding property values. As a result, these items share the PropertyValue type definitions.

This class provides a placeholder for parsing property items, however objects parse by this class will likely be PropertyValue's instead.

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

build(pages) classmethod

Return a Relation property with the specified pages.

RichText

Notion rich text type.

rich_text: list[SerializeAsAny[RichTextObject]] = None class-attribute instance-attribute

Rollup

A Notion rollup property value.

rollup: RollupObject | None = None class-attribute instance-attribute

RollupArray

A Notion rollup array property value.

array: list[PropertyValue] instance-attribute

value: list[PropertyValue] property

Return the native representation of this Rollup object.

RollupDate

A Notion rollup date property value.

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

value: DateType | None property

RollupNumber

A Notion rollup number property value.

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

value: float | int | None property

Return the native representation of this Rollup object.

RollupObject

A Notion rollup property value.

function: AggFunc | None = None class-attribute instance-attribute

value abstractmethod property

Return the native representation of this Rollup object.

Select

Notion select type.

select: SelectOption | None = None class-attribute instance-attribute

Status

Notion status property.

status: SelectOption | None = None class-attribute instance-attribute

StringFormula

A Notion string formula result.

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

value property

Title

Notion title type.

title: list[SerializeAsAny[RichTextObject]] = None class-attribute instance-attribute

URL

Notion URL type.

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

UniqueID

A Notion unique-id property value.

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

Verification

A Notion verification property value.

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