
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
notionary
Advanced tools
Python library for programmatic Notion workspace management - databases, pages, and content with advanced Markdown support
Transform complex Notion API interactions into simple, Pythonic code. Perfect for developers building AI agents, automation workflows, and dynamic content systems.
async / awaitpip install notionary
Set up your Notion integration and configure your token:
export NOTION_SECRET=your_integration_key
https://github.com/user-attachments/assets/da8b4691-bee4-4b0f-801e-dccacb630398
Create rich database entries with properties, content, and beautiful formatting
from notionary import NotionPage
# Find pages by name with fuzzy matching
page = await NotionPage.from_title("Meeting Notes")
# Define rich content with extended markdown
content = """
## Action Items
- [x] Review proposal
- [ ] Schedule meeting
[callout](Key decision made! "💡")
| Task | Owner | Deadline |
|------|-------|----------|
| Design Review | Alice | 2024-03-15 |
| Implementation | Bob | 2024-03-22 |
+++ Budget Details
See attached spreadsheet...
"""
await page.append_markdown(content)
Read or replace content:
existing = await page.get_markdown_content()
print(existing)
await page.replace_content("# Fresh Start\nThis page was rewritten.")
Every Notion block type with extended syntax:
| Block Type | Markdown Syntax | Use Case |
|---|---|---|
| Toggles | +++ Title\nContent\n+++ | Collapsible sections |
| Columns | ::: columns\n::: column\nContent\n:::\n::: | Side-by-side layouts |
| Tables | Standard markdown tables | Structured data |
| Media | [video](https://example.com/file.mp4) | External media URLs |
| Code | Standard code fences with captions | Code snippets |
| Equations | $LaTeX$ | Mathematical expressions |
| TOC | [toc] | Auto-generated navigation |
flowchart TD
WS[Workspace] --> DB[(Database)]
WS --> PG[Page]
DB --> DS[(Data Source)]
DS --> PG
WS --> USR[Users]
PG --> BLK[Blocks]
PG --> CM[Comments]
PG --> PROP[Properties]
Smart Discovery
Extended Markdown
Modern Python
|
Round-Trip Editing
AI-Ready Architecture
Complete Coverage
|
from notionary import MarkdownBuilder
markdown = (
MarkdownBuilder()
.h2("Setup Guide")
.paragraph("Basic steps.")
.toggle("Advanced Options", lambda b:
b.paragraph("Power user settings.")
.bulleted_list(["Debug mode", "Custom timeouts"]))
.columns(
lambda c: c.paragraph("Left column"),
lambda c: c.paragraph("Right column")
)
.build()
)
page = await NotionPage.from_title("Playground")
await page.append_markdown(markdown)
from notionary import NotionWorkspace, NotionWorkspaceQueryConfigBuilder
workspace = await NotionWorkspace.from_current_integration()
builder = NotionWorkspaceQueryConfigBuilder()
config = (
builder
.with_pages_only()
.with_query("roadmap")
.with_page_size(5)
.build()
)
pages = await workspace.get_pages(config)
for p in pages:
print(p.title)
from notionary import NotionDataSource
ds = await NotionDataSource.from_title("Engineering Backlog")
status_labels = ds.get_status_options_by_property_name("Status")
print(status_labels)
builder = ds.get_query_builder()
params = (
builder
.where("Status")
.equals("In Progress")
.order_by_last_edited_time()
.build()
)
pages = await ds.get_pages(query_params=params)
page = await NotionPage.from_title("Sprint Board")
await page.properties.set_select_property_by_option_name("Phase", "Design")
await page.properties.set_multi_select_property_by_option_names("Tags", ["Backend", "API"])
await page.properties.set_status_property_by_option_name("Status", "In Progress")
mathisarends.github.io/notionary – Complete API reference, guides, and tutorials
We welcome contributions from the community! Whether you're:
Check our Contributing Guide to get started.
Ready to revolutionize your Notion workflows?
📖 Read the Docs • 🚀 Getting Started • 💻 Browse Examples
Built with ❤️ for Python developers and AI agents
Transform complex Notion API interactions into simple, powerful code.
FAQs
Python library for programmatic Notion workspace management - databases, pages, and content with advanced Markdown support
We found that notionary demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.