skillfed

notion

Unofficial Python API client for Notion.so

notion v0.1.0 997.2K downloads/30d#4,546 on PyPI4,375
Permissive license Active released

What it is and what it does

notion-py is an object-oriented wrapper around Notion.so's internal API v3 that lets you interact with Notion databases, pages, and blocks from Python code. It maps Notion's table structures (blocks, collections, spaces, users) to Python classes and properties, so you can read and modify Notion content programmatically—changing a page title in Python immediately updates the live Notion UI, and vice versa through a local cache and optional long-polling subscription.

The package handles automatic conversion between Notion's internal data formats and Python objects, supports traversing block hierarchies, adding/deleting blocks, and registering callbacks to respond to changes. It includes a central RecordStore that keeps all data in sync, so Record instances always reflect the latest state without storing state internally. Note that automatic Notion-to-Python updates are currently broken and disabled by default; you must call refresh() manually to pull changes from the server.

Use it for:

  • Automate bulk updates to Notion databases—modify multiple rows or pages programmatically without manual UI interaction.
  • Build a Python application that reads from Notion as a data source, treating Notion tables as a backend database.
  • Create scripts that respond to Notion changes via callbacks, triggering external actions or updating other systems.
  • Manage Notion page hierarchies and block organization—move, add, or delete blocks and nested content in bulk.
  • Embed Notion content (collections, views, blocks) into Python workflows for reporting or data processing.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Unofficial Python client for Notion.so API v3 that maps Notion database tables to Python classes, enabling object-oriented read/write access to Notion pages, blocks, and collections.

Yes, if you need programmatic access to Notion and are comfortable with an unofficial API client. The package is actively maintained, has no known vulnerabilities, and low install friction. However, be aware that automatic Notion-to-Python updates are disabled and require manual refresh() calls, and the underlying Notion API v3 is undocumented and subject to change without notice.

Install

notion on PyPI

pip

pip install notion

uv

uv add notion

poetry

poetry add notion

Installing notion

Before you install

Low install friction with seven runtime dependencies (requests, commonmark, bs4, tzlocal, python-slugify, dictdiffer, cached-property). Actively maintained with recent commits and no known vulnerabilities. Requires Python 3.5 or greater.

License in practice

MIT license (permissive) allows commercial and private use with minimal restrictions, making it suitable for most projects without licensing concerns.

Quickstart

pip install notion

from notion.client import NotionClient

client = NotionClient(token_v2="<your_token_v2>")
page = client.get_block("https://www.notion.so/myorg/Test-c0d20a71c0944985ae96e661ccc99821")
page.title = "Updated title"

Requires a valid Notion token_v2 obtained from browser cookies on a logged-in Notion.so session; Notion->Python automatic updating is currently disabled by default, requiring manual refresh() calls.

Verify before relying

  • Whether the long-polling background daemon thread for live updates is stable and production-ready despite the noted monitoring issues.
  • Current state of the Notion API v3 compatibility—whether Notion has deprecated or changed the API since this client's last release.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.5)
Install friction low — pure-Python wheel
Runtime dependencies 7 — requests, commonmark, bs4, tzlocal, python-slugify, dictdiffer, cached-property
Maintenance actively maintained — 179 days since the last release
Last repo commit
First released
Downloads 997,152/month — #4,546 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: notion-0.1.0-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

notion api python clientnotion database python wrappernotion page automationnotion block manipulationnotion collection accessnotion sdk unofficialpython notion integration
notion-integrationapi-wrapperdatabase-client

More Front-Ends packages