Skip to main content

For easy use notion-sdk-py.

Project description

notion_kit

notion_kit is a lightweight Python SDK wrapper around notion-client. It keeps the official Client object and adds object-oriented helpers for common Notion API workflows.

中文文档是本仓库的维护源和事实基准;英文文档是展示和同步版本。中英文含义不一致时,以中文文档为准。

Documentation

Project Governance

Install

pip install notion-kit

For local development:

pip install -e .

Quick Start

import os

from notion_kit import Kit as nkit

notion = nkit.Client(token=os.environ["NOTION_TOKEN"])
page_id = nkit.get_id("<NOTION_PAGE_URL>")
page = nkit.Page.get_data(page_id)

print(page.id)

Supported Integration Model

本 SDK 当前按 Notion internal integration 使用场景维护和验证。推荐使用 Notion integration token,通过 NOTION_TOKEN 传入 nkit.Client(),并把目标页面、database 或 data source 授权给对应 integration。

OAuth helpers are thin pass-through wrappers for public integration OAuth flows. They are documented for completeness, but they are outside the internal-integration live validation scope.

Current API Boundary

This package targets notion-client >=3.1.0,<4. In the current Notion API model, a database container and a data source are different concepts:

  • Database: the Notion page-level database container.
  • Data source: the schema and rows inside a database.

Use the data source id when querying rows, reading schema, updating schema, or creating rows under a database.

nkit.Client() defaults to Notion API version 2026-03-11 and attaches wrappers for the current SDK endpoint families:

  • Object helpers: Page, Database, DataSource, Block, User, Gadget
  • Pass-through endpoint wrappers: Search, Comment, FileUpload, View, CustomEmoji, OAuth

See 最新 SDK 操作 / Latest SDK Operations for the full mapping.

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

notion_kit-1.1.1.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

notion_kit-1.1.1-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

Details for the file notion_kit-1.1.1.tar.gz.

File metadata

  • Download URL: notion_kit-1.1.1.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for notion_kit-1.1.1.tar.gz
Algorithm Hash digest
SHA256 5c6086c77532b6373720f76d338cf9ed1e94b481ac140c1d1857ba21b0df2af6
MD5 d731ce35189fc38a1e27589a641e7f48
BLAKE2b-256 bb106b43702fee096d450cfbcf3f908049638d4d02882034f7fdbe6e41a1d01c

See more details on using hashes here.

Provenance

The following attestation bundles were made for notion_kit-1.1.1.tar.gz:

Publisher: publish.yml on bluewhitep/Notion_kit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file notion_kit-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: notion_kit-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 44.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for notion_kit-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 147da5b30b4329279c97a19e240682fd946a8da7957dba3c01309bd57500970f
MD5 dd9dbcdb8174ae37e74f552d55bb1f80
BLAKE2b-256 be31b5789eeeaa3d1fb520a1d84e17635fce5438b409b4a9e2a77fd64adfcbef

See more details on using hashes here.

Provenance

The following attestation bundles were made for notion_kit-1.1.1-py3-none-any.whl:

Publisher: publish.yml on bluewhitep/Notion_kit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page