Giter VIP home page Giter VIP logo

ultimate-notion's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.