notion_python_client.models package#
Subpackages#
- notion_python_client.models.properties package
- Submodules
- notion_python_client.models.properties.checkbox module
- notion_python_client.models.properties.created_by module
- notion_python_client.models.properties.created_time module
- notion_python_client.models.properties.date module
- notion_python_client.models.properties.email module
- notion_python_client.models.properties.files module
- notion_python_client.models.properties.formula module
- notion_python_client.models.properties.last_edited_by module
- notion_python_client.models.properties.last_edited_time module
- notion_python_client.models.properties.multi_select module
- notion_python_client.models.properties.number module
- notion_python_client.models.properties.people module
- notion_python_client.models.properties.phone_number module
- notion_python_client.models.properties.properties_base module
- notion_python_client.models.properties.properties_base_dict module
- notion_python_client.models.properties.relation module
- notion_python_client.models.properties.rich_text module
- notion_python_client.models.properties.select module
- notion_python_client.models.properties.status module
- notion_python_client.models.properties.title module
- notion_python_client.models.properties.unique_id module
- notion_python_client.models.properties.url module
- Module contents
Submodules#
notion_python_client.models.annotations module#
- class notion_python_client.models.annotations.Annotation(*, bold: bool | None, italic: bool | None, strikethrough: bool | None, underline: bool | None, code: bool | None, color: Literal['blue', 'blue_background', 'brown', 'brown_background', 'default', 'gray', 'gray_background', 'green', 'green_background', 'orange', 'orange_background', 'pink', 'pink_background', 'purple', 'purple_background', 'red', 'red_background', 'yellow', 'yellow_background'] | None)#
Bases:
BaseModel- bold: bool | None#
- code: bool | None#
- color: Literal['blue', 'blue_background', 'brown', 'brown_background', 'default', 'gray', 'gray_background', 'green', 'green_background', 'orange', 'orange_background', 'pink', 'pink_background', 'purple', 'purple_background', 'red', 'red_background', 'yellow', 'yellow_background'] | None#
- italic: bool | None#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- strikethrough: bool | None#
- underline: bool | None#
notion_python_client.models.database_reference module#
notion_python_client.models.date module#
- class notion_python_client.models.date.Date(*, start: datetime | date, end: datetime | None = None)#
Bases:
BaseModel- end: datetime | None#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- start: datetime | date#
notion_python_client.models.emoji module#
notion_python_client.models.equation module#
notion_python_client.models.file module#
- class notion_python_client.models.file.File(*, name: str | None = None, type: Literal['external', 'file'], file: Dict[str, str | datetime] | None = None, external: Dict | None = None)#
Bases:
BaseModel- create_object(property_name: str = 'file') Dict#
Create a file object that can be used in the properties of a page.
- Parameters:
property_name (str) – The name of the property that should be created (default: “file”)
- Returns:
The created file object
- Return type:
Dict
- external: Dict | None#
- file: Dict[str, str | datetime] | None#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str | None#
- type: Literal['external', 'file']#
notion_python_client.models.link module#
notion_python_client.models.mention module#
- class notion_python_client.models.mention.Mention(*, type: Literal['database', 'date', 'link_preview', 'page', 'template_mention', 'user'], database: DatabaseReference | None = None, date: Date | None = None, link_preview: Link | None = None, page: PageReference | None = None, template_mention: TemplateReference | None = None, user: User | None = None)#
Bases:
BaseModel- database: DatabaseReference | None#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- page: PageReference | None#
- template_mention: TemplateReference | None#
- type: Literal['database', 'date', 'link_preview', 'page', 'template_mention', 'user']#
notion_python_client.models.page module#
- class notion_python_client.models.page.Page(*, object: str = 'page', id: str, archived: bool | None = False, parent: Parent, created_time: datetime, last_edited_time: datetime, created_by: User, last_edited_by: User, icon: File | Emoji | None = None, cover: File | None = None, properties: Dict[str, DateDict | StatusDict | Number | SelectDict | MultiSelect | People | Files | Checkbox | Email | PhoneNumber | FormulaDict | Relation | CreatedTime | CreatedBy | LastEditedTime | LastEditedBy | RichTextProp | Title | URL | UniqueIdDict | RollupDict], url: str, public_url: str | None = None)#
Bases:
BaseModel- archived: bool | None#
- created_time: datetime#
- id: str#
- last_edited_time: datetime#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- object: str#
- properties: Dict[str, DateDict | StatusDict | Number | SelectDict | MultiSelect | People | Files | Checkbox | Email | PhoneNumber | FormulaDict | Relation | CreatedTime | CreatedBy | LastEditedTime | LastEditedBy | RichTextProp | Title | URL | UniqueIdDict | RollupDict]#
- public_url: str | None#
- url: str#
notion_python_client.models.page_reference module#
notion_python_client.models.parent module#
- class notion_python_client.models.parent.Parent(*, type: str = 'database_id', database_id: UUID)#
Bases:
BaseModelNote: Currntly only the datbase parent is supported. The page parent is not supported yet.
- create_object(property_name: str = 'parent') Dict#
Create a file object that can be used in the properties of a page.
- Parameters:
property_name (str) – The name of the property that should be created (default: “parent”)
- Returns:
The created file object
- Return type:
Dict
- database_id: UUID#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: str#
notion_python_client.models.rich_text module#
- class notion_python_client.models.rich_text.RichText(*, id: str | None = None, type: Literal['text', 'mention', 'equation'], text: Text | None = None, mention: Mention | None = None, equation: Equation | None = None, annotations: Annotation = None, plain_text: str | None = None, href: str | None = None)#
Bases:
PropertiesBase,BaseModel- annotations: Annotation#
- create_object(property_name: str) Dict#
- href: str | None#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- plain_text: str | None#
- type: Literal['text', 'mention', 'equation']#
notion_python_client.models.template_reference module#
- class notion_python_client.models.template_reference.TemplateReference(*, type: Literal['template_mention_date', 'template_mention_uesr'], template_mention_date: Literal['today', 'now'] | None = None, template_mention_user: Literal['me'] | None = None)#
Bases:
BaseModel- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- template_mention_date: Literal['today', 'now'] | None#
- template_mention_user: Literal['me'] | None#
- type: Literal['template_mention_date', 'template_mention_uesr']#