Skip to main content

The ultimate Python client for Notion!

Project description

Ultimate-Notion logo

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 Tests Coverage Publish Package Build Docs
Package PyPI - Version PyPI - Downloads PyPI - Python Version GitHub Sponsors
Details Hatch project Linting - Ruff Pre-Commit test - pytest Types - Mypy License - MIT Docs - mkdocs

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:

  1. make sure hatch is installed globally, e.g. pipx install hatch,
  2. 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


Download files

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

Source Distribution

ultimate_notion-0.5.1.tar.gz (73.0 kB view details)

Uploaded Source

Built Distribution

ultimate_notion-0.5.1-py3-none-any.whl (87.5 kB view details)

Uploaded Python 3

File details

Details for the file ultimate_notion-0.5.1.tar.gz.

File metadata

  • Download URL: ultimate_notion-0.5.1.tar.gz
  • Upload date:
  • Size: 73.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for ultimate_notion-0.5.1.tar.gz
Algorithm Hash digest
SHA256 7759411a6b160a6ce882f1560d595850c18e922418d2b15762a180c883da37d3
MD5 e05c1a8bc2c377192011b7102e7e95d3
BLAKE2b-256 df2862c2696b7a35762285f69c1a00acf87bf43192472ca79847a692eaa57cb6

See more details on using hashes here.

File details

Details for the file ultimate_notion-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ultimate_notion-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5bf52a0bc78f2cb9218c63033422ec2e5f123d44b0bdcc0a829c5b658a4f4dee
MD5 a9efed9f6156e1e05b862e26527f949a
BLAKE2b-256 4cffbb8c6766808aed395a6046434b4728c8fe611ab71e3ead8deddec336f5e3

See more details on using hashes here.

Supported by

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