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
- Security policy
- Contributing guide
- Local live-test configuration template: env.example
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c6086c77532b6373720f76d338cf9ed1e94b481ac140c1d1857ba21b0df2af6
|
|
| MD5 |
d731ce35189fc38a1e27589a641e7f48
|
|
| BLAKE2b-256 |
bb106b43702fee096d450cfbcf3f908049638d4d02882034f7fdbe6e41a1d01c
|
Provenance
The following attestation bundles were made for notion_kit-1.1.1.tar.gz:
Publisher:
publish.yml on bluewhitep/Notion_kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
notion_kit-1.1.1.tar.gz -
Subject digest:
5c6086c77532b6373720f76d338cf9ed1e94b481ac140c1d1857ba21b0df2af6 - Sigstore transparency entry: 2064778852
- Sigstore integration time:
-
Permalink:
bluewhitep/Notion_kit@aa3bff587d0b7e9a0a1c3bd6dcee71c8686ee2db -
Branch / Tag:
refs/tags/v_1.1.1 - Owner: https://github.com/bluewhitep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@aa3bff587d0b7e9a0a1c3bd6dcee71c8686ee2db -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
147da5b30b4329279c97a19e240682fd946a8da7957dba3c01309bd57500970f
|
|
| MD5 |
dd9dbcdb8174ae37e74f552d55bb1f80
|
|
| BLAKE2b-256 |
be31b5789eeeaa3d1fb520a1d84e17635fce5438b409b4a9e2a77fd64adfcbef
|
Provenance
The following attestation bundles were made for notion_kit-1.1.1-py3-none-any.whl:
Publisher:
publish.yml on bluewhitep/Notion_kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
notion_kit-1.1.1-py3-none-any.whl -
Subject digest:
147da5b30b4329279c97a19e240682fd946a8da7957dba3c01309bd57500970f - Sigstore transparency entry: 2064778858
- Sigstore integration time:
-
Permalink:
bluewhitep/Notion_kit@aa3bff587d0b7e9a0a1c3bd6dcee71c8686ee2db -
Branch / Tag:
refs/tags/v_1.1.1 - Owner: https://github.com/bluewhitep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@aa3bff587d0b7e9a0a1c3bd6dcee71c8686ee2db -
Trigger Event:
release
-
Statement type: