Installation¶
Get Notionary up and running in just a few steps.
Requirements¶
- Python 3.8 or higher
- A Notion account with workspace access
Install Notionary¶
Install using pip:
Setup Your Notion Integration¶
Before using Notionary, you need to create a Notion integration and get your API token.
Step 1: Create a Notion Integration¶
- Go to notion.so/profile/integrations
- Click "+ New integration"
- Give your integration a name (e.g., "My Notionary App")
- Select the workspace you want to use
- Click "Submit"
Step 2: Get Your Integration Token¶
After creating the integration, you'll see an "Internal Integration Token". Copy this token - you'll need it next.
Step 3: Set Environment Variable¶
Create a .env
file in your project directory:
Or set it directly in your environment:
Step 4: Share Pages with Your Integration¶
Your integration needs access to the pages/databases you want to work with:
- Open the Notion page or database you want to use
- Click "Share" in the top-right corner
- Click "Invite" and search for your integration name
- Select your integration and click "Invite"
Verify Installation¶
Test your setup with a simple script:
import asyncio
from dotenv import load_dotenv
load_dotenv()
from notionary import NotionWorkspace
async def test_connection():
workspace = NotionWorkspace()
try:
databases = await workspace.list_all_databases()
print(f"✅ Connected! Found {len(databases)} databases.")
return True
except Exception as e:
print(f"❌ Connection failed: {e}")
return False
if __name__ == "__main__":
asyncio.run(test_connection())
If you see the success message, you're ready to start using Notionary!
Next Steps¶
- Getting Started - Learn what Notionary can do and see examples
- Page Management - Work with individual Notion pages
- Database Operations - Query and manage databases
- Examples - Real-world usage examples