Quick Start#
Authentication Setup: To use NPC, you need to create an integration in your Notion workspace and obtain an API token. Follow our authentication guide to set this up.
Import NPC: Import the library into your Python script:
from notion_python_client import NPC
Create a Notion Client: Initialize a Notion client with your API token:
client = NPC("YOUR_API_TOKEN")
Interact with Notion: You’re ready to start using NPC to interact with Notion. Here’s an example of creating a new page:
pages = client.database_handler.get_pages("YOUR_DATABASE_ID")