Schema
schema ¶
Objects representing a database schema.
Properties are used when
Unfortunately, the way a schema is defined in case of 1. and 2. is not consistent. In case 1., the property name is only defined as a key while in case 2. it is additionally defined as name attribute of the property object. We treat these two cases the same way when constructing the property objects. For this reason name is Unset by default.
GO_co = TypeVar('GO_co', bound=GenericObject, covariant=True, default=GenericObject) module-attribute ¶
Button ¶
Button database property.
button: ButtonTypeData = Field(default_factory=ButtonTypeData) class-attribute instance-attribute ¶
ButtonTypeData ¶
Type data for Button.
Checkbox ¶
Defines the checkbox configuration for a database property.
checkbox: CheckboxTypeData = Field(default_factory=CheckboxTypeData) class-attribute instance-attribute ¶
CheckboxTypeData ¶
Type data for Checkbox.
CreatedBy ¶
Defines the created-by configuration for a database property.
created_by: CreatedByTypeData = Field(default_factory=CreatedByTypeData) class-attribute instance-attribute ¶
CreatedByTypeData ¶
Type data for CreatedBy.
CreatedTime ¶
Defines the created-time configuration for a database property.
created_time: CreatedTimeTypeData = Field(default_factory=CreatedTimeTypeData) class-attribute instance-attribute ¶
CreatedTimeTypeData ¶
Type data for CreatedTime.
Date ¶
Defines the date configuration for a database property.
date: DateTypeData = Field(default_factory=DateTypeData) class-attribute instance-attribute ¶
DateTypeData ¶
Type data for Date.
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.
DualPropertyRelationTypeData ¶
Type data for DualPropertyRelation.
synced_property_id: str | UnsetType = Unset class-attribute instance-attribute ¶
synced_property_name: str | UnsetType = Unset class-attribute instance-attribute ¶
__eq__(other: object) -> bool ¶
Compare DualPropertyRelation objects by all attributes except id.
__hash__() -> int ¶
Return a hash of the DualPropertyRelation TypeData based on synced_property_name.
Email ¶
Defines the email configuration for a database property.
email: EmailTypeData = Field(default_factory=EmailTypeData) class-attribute instance-attribute ¶
EmailTypeData ¶
Type data for Email.
Files ¶
Defines the files configuration for a database property.
files: FilesTypeData = Field(default_factory=FilesTypeData) class-attribute instance-attribute ¶
FilesTypeData ¶
Type data for Files.
Formula ¶
FormulaTypeData ¶
Type data for Formula.
expression: str instance-attribute ¶
__eq__(other: object) -> bool ¶
Compare Formula objects by all attributes except id.
__hash__() -> int ¶
Return a hash of the Formula TypeData.
Since eq always returns True due to API expression transformation, we use a constant hash to maintain consistency with equality.
LastEditedBy ¶
Defines the last-edited-by configuration for a database property.
last_edited_by: LastEditedByTypeData = Field(default_factory=LastEditedByTypeData) class-attribute instance-attribute ¶
LastEditedByTypeData ¶
Type data for LastEditedBy.
LastEditedTime ¶
Defines the last-edited-time configuration for a database property.
last_edited_time: LastEditedTimeTypeData = Field(default_factory=LastEditedTimeTypeData) class-attribute instance-attribute ¶
LastEditedTimeTypeData ¶
Type data for LastEditedTime.
MultiSelect ¶
MultiSelectTypeData ¶
Type data for MultiSelect.
options: list[SelectOption] = Field(default_factory=list) class-attribute instance-attribute ¶
Number ¶
NumberTypeData ¶
People ¶
Defines the people configuration for a database property.
people: PeopleTypeData = Field(default_factory=PeopleTypeData) class-attribute instance-attribute ¶
PeopleTypeData ¶
Type data for People.
PhoneNumber ¶
Defines the phone number configuration for a database property.
phone_number: PhoneNumberTypeData = Field(default_factory=PhoneNumberTypeData) class-attribute instance-attribute ¶
PhoneNumberTypeData ¶
Type data for PhoneNumber.
Property ¶
PropertyRelation ¶
Relation ¶
Defines the relation configuration for a database property.
relation: SinglePropertyRelation | DualPropertyRelation instance-attribute ¶
RichText ¶
Defines the rich text configuration for a database property.
rich_text: RichTextTypeData = Field(default_factory=RichTextTypeData) class-attribute instance-attribute ¶
RichTextTypeData ¶
Type data for RichText.
Rollup ¶
RollupTypeData ¶
Type data for Rollup.
function: AggFunc = AggFunc.COUNT_ALL class-attribute instance-attribute ¶
relation_property_id: str | UnsetType = Unset class-attribute instance-attribute ¶
relation_property_name: str instance-attribute ¶
rollup_property_id: str | UnsetType = Unset class-attribute instance-attribute ¶
rollup_property_name: str instance-attribute ¶
__eq__(value: object) -> bool ¶
Compare Rollup objects by all attributes except id.
__hash__() -> int ¶
Return a hash of the Rollup TypeData based on function and property names.
validate_enum_field(field: str) -> AggFunc classmethod ¶
Select ¶
SelectTypeData ¶
Type data for Select.
options: list[SelectOption] = Field(default_factory=list) class-attribute instance-attribute ¶
SinglePropertyRelation ¶
Defines a one-way relation configuration for a database property.
single_property: SinglePropertyRelationTypeData = Field(default_factory=SinglePropertyRelationTypeData) class-attribute instance-attribute ¶
build_relation(dbref: UUID) -> Relation classmethod ¶
Create a single_property relation using the target database reference.
dbref must be either a string or UUID.
SinglePropertyRelationTypeData ¶
Type data for SinglePropertyRelation.
Status ¶
Defines the status configuration for a database property.
status: StatusTypeData = Field(default_factory=StatusTypeData) class-attribute instance-attribute ¶
build(options: list[SelectOption], groups: list[SelectGroup]) -> Status classmethod ¶
Create a Status object from the list of SelectOption's.
Warning
While a Status property can be built, it can only be used to check a schema, not to create a database having such a property.
StatusTypeData ¶
Title ¶
Defines the title configuration for a database property.
title: TitleTypeData = Field(default_factory=TitleTypeData) class-attribute instance-attribute ¶
TitleTypeData ¶
Type data for Title.
URL ¶
Defines the URL configuration for a database property.
url: URLTypeData = Field(default_factory=URLTypeData) class-attribute instance-attribute ¶
URLTypeData ¶
Type data for URL.
UniqueID ¶
UniqueIDTypeData ¶
Type data for UniqueID.
prefix: str | None = None class-attribute instance-attribute ¶
Verification ¶
Verfication database property of Wiki databases.
verification: VerificationTypeData = Field(default_factory=VerificationTypeData) class-attribute instance-attribute ¶
VerificationTypeData ¶
Type data for Verification.