Skip to content

Database

database

Functionality for working with Notion databases.

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

A Notion database.

This object always represents an original database, not a linked database.

API reference: https://developers.notion.com/docs/working-with-databases

block_url: str property

URL of this database.

cover: File | None property

Return the cover of this database as file.

description: RichText property writable

Return the description of this database as rich text.

icon: File | Emoji | None property

Return the icon of this database as file or emoji.

is_empty: bool property

Is this database empty?

is_inline: bool property

Is this database an inline database?

is_wiki: bool property

Is this database a wiki database.

schema: type[PageSchema] property writable

Schema of the database.

title: RichText property writable

Return the title of this database as rich text.

url: str property

Return the URL of this database.

__bool__() -> bool

Overwrite default behaviour.

__len__() -> int

Return the number of pages in this database.

__repr__() -> str

__str__()

create_page(**kwargs) -> Page

Create a page with properties according to the schema within the corresponding database.

delete() -> Database

Delete/archive this database.

fetch_all() -> View

Fetch all pages and return a view.

query()

Query a (large) database for pages in a more specific way.

reload() -> Database

Reload this database.

restore() -> Database

Restore/unarchive this database.