jamalex / notion-py

Unofficial Python API client for Notion.so
MIT License
4.28k stars 476 forks source link

How to export database? #151

Open mik3y64 opened 4 years ago

mik3y64 commented 4 years ago

Hello @jamalex , thank you for creating notion API in python. I have successfully connected to the Notion client. My goal is simple, export the database to CSV. As per documentation, there are API for querying, filtering, sorting. But how do I export the whole database to CSV? Currently I click on the export button on the top right corner page.

from notion.client import NotionClient

client = NotionClient(token_v2="...")
cv = client.get_collection_view("...")
result = cv.default_query().execute()

# As per documentation, there are API for querying, filtering, sorting. But how do I export the whole database to CSV? Currently I click on the export button on the top right corner page.
callzhang commented 3 years ago

solved by this