Skip to content

Page

page

Functionality around Notion pages.

Page(*args: Any, **kwargs: Any)

A Notion page.

Attributes:

Name Type Description
props PageProperties

accessor for all page properties

children: list[Page | Database] property

Return all contained databases and pages within this page

content: list[Block] property

Return the content of this page, i.e. all blocks belonging to this page

cover: File | None property writable

Cover of the page.

database: Database | None property

If this page is located in a database return the database or None otherwise.

icon: File | Emoji | None property writable

Icon of the page, i.e. emojis, Notion's icons, or custom images.

props: PageProperties instance-attribute

title: RichText property writable

Title of the page.

url: str property

Return the URL of this database.

__repr__() -> str

__str__() -> str

delete() -> Page

Delete/archive this page.

reload() -> Page

Reload this page.

restore() -> Page

Restore/unarchive this page.

show(*, simple: bool | None = None)

Show the content of the page, rendered in Jupyter Lab

to_html(*, raw: bool = False) -> str

Return the content of the page as HTML.

to_markdown() -> str

Return the content of the page as Markdown.

wrap_obj_ref(obj_ref: obj_blocks.Page) -> Page classmethod

PageProperties(page: Page)

Properties of a page as defined in the schema of the database.

This defines the .props namespace of a page page and updates the content on the Notion server side in case of an assignment. Access the properties with page.props.property_name or page.props["Property Name"].

__getitem__(prop_name: str) -> PropertyValue

__iter__()

Iterator of property names.

__setitem__(prop_name: str, value: Any)

to_dict() -> dict[str, PropertyValue]

All page properties as dictionary.

PageProperty(prop_name: str)

Property of a page implementing the descriptor protocol.

__get__(obj: PageProperties, type=None) -> PropertyValue

__set__(obj: PageProperties, value)