Skip to content

Props

props

Wrapper for property values of pages

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

CreatedBy

A Notion created-by property value.

created_by: SerializeAsAny[User] instance-attribute

CreatedTime

A Notion created-time property value.

created_time: dt.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(dt_spec: 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

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.

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: dt.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

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[RichTextBaseObject]] = 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

RollupDate

A Notion rollup date property value.

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

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

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

Title

Notion title type.

title: list[SerializeAsAny[RichTextBaseObject]] = 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: TypeData = TypeData() class-attribute instance-attribute

TypeData

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

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