API

notionapimanager.notion_database_api_manager

notionapimanager.notion_property_encoder

class notionapimanager.notion_database_api_manager.NotionDatabaseApiManager(integration_token, database_ids)

Class for reading from (and writing to) Notion databases

connect()

Perform preparation operations before communicating with Notion API

create_page(database_id, page_properties: List[PropertyValue])

Add Notion page to database

Parameters
  • database_id (str) – id of database you want to add a page to

  • page_properties (List[PropertyValue]) – property values of new page

get_database(database_id)

Read Notion database and return a Pandas DataFrame

Parameters

database_id (str) – id of database you want to retrieve

Returns

dataframe of the database

Return type

pd.DataFrame

get_page_blocks(page_id)

Get page blocks

Parameters

page_id (str) – id of the page

Returns

list of blocks of the page

Return type

list

class notionapimanager.notion_property_encoder.PropertyValue(name, value)
name: str

Alias for field number 0

value: Any

Alias for field number 1