Skip to content

Schema

schema

Objects representing a database schema.

Checkbox

Defines the checkbox configuration for a database property.

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

CreatedBy

Defines the created-by configuration for a database property.

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

CreatedTime

Defines the created-time configuration for a database property.

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

Date

Defines the date configuration for a database property.

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

DualPropertyRelation

Defines a two-way relation configuration for a database property.

If a two-way relation property X relates to Y then the two-way relation property Y relates to X.

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

build(dbref) classmethod

Create a dual_property relation using the target database reference.

dbref must be either a string or UUID.

Email

Defines the email configuration for a database property.

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

Files

Defines the files configuration for a database property.

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

Formula

Defines the formula configuration for a database property.

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

build(expression) classmethod

LastEditedBy

Defines the last-edited-by configuration for a database property.

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

LastEditedTime

Defines the last-edited-time configuration for a database property.

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

MultiSelect

Defines the multi-select configuration for a database property.

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

build(options) classmethod

Create a Select object from the list of SelectOption's.

Number

Defines the number configuration for a database property.

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

build(format) classmethod

Create a Number object with the expected format.

People

Defines the people configuration for a database property.

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

PhoneNumber

Defines the phone number configuration for a database property.

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

PropertyRelation

Defines common configuration for a property relation.

database_id: UUID = None class-attribute instance-attribute

PropertyType

Base class for Notion property objects.

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

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

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

Relation

Defines the relation configuration for a database property.

relation: SerializeAsAny[PropertyRelation] instance-attribute

RenameProp

Use to rename a property during a database update.

name: str instance-attribute

RichText

Defines the rich text configuration for a database property.

rich_text: Any = Field(default_factory=dict) class-attribute instance-attribute

Rollup

Defines the rollup configuration for a database property.

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

build(relation, property, function) classmethod

Select

Defines the select configuration for a database property.

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

build(options) classmethod

Create a Select object from the list of SelectOption's.

SinglePropertyRelation

Defines a one-way relation configuration for a database property.

single_property: Any = Field(default_factory=dict) class-attribute instance-attribute

build(dbref) classmethod

Create a single_property relation using the target database reference.

dbref must be either a string or UUID.

Status

Defines the status configuration for a database property.

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

Title

Defines the title configuration for a database property.

title: Any = Field(default_factory=dict) class-attribute instance-attribute

URL

Defines the URL configuration for a database property.

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

UniqueID

Unique ID database property.

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

Verification

Verfication database property of Wiki databases.

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