The ultimate Python client for Notion!
Project description
Ultimate Notion is the ultimate Python client for Notion 🚀 It allows you to access and modify your Notion databases and pages in the most convenient and pythonic way.
CI/CD | |
Package | |
Details |
Installation
Install the most recent release using PyPI with:
pip install ultimate-notion
or to install all additional dependencies, use:
pip install 'ultimate-notion[all]'
Usage
Make sure you have set the environment variable NOTION_TOKEN
to your Notion
integration token. Then it's as simple as:
import ultimate_notion as uno
PAGE_TITLE = 'Getting Started'
with uno.Session() as notion:
page = notion.search_page(PAGE_TITLE).item()
page.show()
# Alternatively, without a context manager:
notion = uno.Session()
page = notion.search_page(PAGE_TITLE).item()
page.show()
notion.close()
Check out the official Ultimate Notion documentation for more details. Especially the page about creating a Notion integration to get the token. The documentation is made with Material for MkDocs and is hosted on GitHub Pages.
Contributing
After having cloned this repository:
- make sure hatch is installed globally, e.g.
pipx install hatch
, - make sure pre-commit is installed globally, e.g. with
pipx install pre-commit
,
and then you are already set up to start hacking. Use hatch run test
to run the unit tests or hatch run vcr-only
to run the offline unit tests using VCR.py. Regenerate the cassettes with hatch run vcr-rewrite
.
Check out the environment setup of hatch in pyproject.toml for many more commands.
If you are using VS Code, it's quite convenient to create a file .vscode/.env
with
NOTION_TOKEN=secret_YOUR_TOKEN_TO_YOUR_TEST_NOTION_ACCOUNT
ULTIMATE_NOTION_CONFIG=/path/to/repo/.ultimate-notion/config.toml
Check out this page about contributing for more details.
License & Credits
Ultimate Notion is distributed under the terms of the MIT license. To start this project off a lot of inspiration and code was taken from hatch and notional. Ultimate Notion highly depends on notion-sdk-py.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file ultimate_notion-0.6.tar.gz
.
File metadata
- Download URL: ultimate_notion-0.6.tar.gz
- Upload date:
- Size: 76.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f4ad3dd628f62460a7d9da52c34babd37e9fe2c9eec17ff8a6197ecd2e57935 |
|
MD5 | f4619805d55777534745a69638a3717f |
|
BLAKE2b-256 | 8d65a723f84e0e1a2018b11217e6d97aecb7408c17fbe570f50c6bb35e59450a |
File details
Details for the file ultimate_notion-0.6-py3-none-any.whl
.
File metadata
- Download URL: ultimate_notion-0.6-py3-none-any.whl
- Upload date:
- Size: 91.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91783c28133fbe8c2776b17b8e4ba5765e2f3061e0f2d1b07b292cfb52daf9bc |
|
MD5 | 191406fd74a80bfa8d3e188958b770d5 |
|
BLAKE2b-256 | f9e2ef362c9fa2f33a7c47c0e4ef0a14eb36a49d59e8daf61bd156cb8bf9a3ac |