Skip to content

Schema

schema

Objects representing a database schema.

Checkbox

Defines the checkbox configuration for a database property.

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

TypeData

CreatedBy

Defines the created-by configuration for a database property.

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

TypeData

CreatedTime

Defines the created-time configuration for a database property.

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

TypeData

Date

Defines the date configuration for a database property.

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

TypeData

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: TypeData = TypeData() class-attribute instance-attribute

TypeData

synced_property_id: str | None = None class-attribute instance-attribute
synced_property_name: str = None 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: TypeData = TypeData() class-attribute instance-attribute

TypeData

Files

Defines the files configuration for a database property.

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

TypeData

Formula

Defines the formula configuration for a database property.

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

TypeData

expression: str = None class-attribute instance-attribute

build(expression) classmethod

LastEditedBy

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

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

TypeData

LastEditedTime

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

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

TypeData

MultiSelect

Defines the multi-select configuration for a database property.

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

TypeData

options: list[SelectOption] = Field(default_factory=list) 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: TypeData = TypeData() class-attribute instance-attribute

TypeData

format: NumberFormat = NumberFormat.NUMBER class-attribute instance-attribute
validate_enum_field(field: str) classmethod

build(format) classmethod

Create a Number object with the expected format.

People

Defines the people configuration for a database property.

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

TypeData

PhoneNumber

Defines the phone number configuration for a database property.

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

TypeData

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

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: TypeData = TypeData() class-attribute instance-attribute

TypeData

Rollup

Defines the rollup configuration for a database property.

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

TypeData

function: AggFunc = AggFunc.COUNT_ALL class-attribute instance-attribute
relation_property_id: str | None = None class-attribute instance-attribute
relation_property_name: str = None class-attribute instance-attribute
rollup_property_id: str | None = None class-attribute instance-attribute
rollup_property_name: str = None class-attribute instance-attribute
validate_enum_field(field: str) classmethod

build(relation, property, function) classmethod

Select

Defines the select configuration for a database property.

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

TypeData

options: list[SelectOption] = Field(default_factory=list) 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: TypeData = TypeData() class-attribute instance-attribute

TypeData

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: TypeData = TypeData() class-attribute instance-attribute

TypeData

groups: list[SelectGroup] = Field(default_factory=list) class-attribute instance-attribute
options: list[SelectOption] = Field(default_factory=list) class-attribute instance-attribute

Title

Defines the title configuration for a database property.

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

TypeData

URL

Defines the URL configuration for a database property.

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

TypeData

UniqueID

Unique ID database property.

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

TypeData

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

Verification

Verfication database property of Wiki databases.

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

TypeData