Metadata-Version: 2.1
Name: ultimate-notion
Version: 0.2
Summary: The ultimate Python library for Notion!
Project-URL: Documentation, https://ultimate-notion.com/
Project-URL: Sponsor, https://github.com/sponsors/FlorianWilhelm
Project-URL: Tracker, https://github.com/ultimate-notion/ultimate-notion/issues
Project-URL: Source, https://github.com/ultimate-notion/ultimate-notion
Author-email: Florian Wilhelm <Florian.Wilhelm@gmail.com>
License-Expression: MIT
License-File: AUTHORS.md
License-File: LICENSE.txt
Keywords: notion,notion client
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Office/Business
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: emoji~=2.8
Requires-Dist: mistune~=3.0
Requires-Dist: notion-client~=2.1
Requires-Dist: notion2md
Requires-Dist: numpy~=1.24
Requires-Dist: pandas~=2.0
Requires-Dist: pydantic~=2.0
Requires-Dist: tabulate>=0.9
Provides-Extra: all
Requires-Dist: ultimate-notion[google]; extra == 'all'
Provides-Extra: google
Requires-Dist: google-api-python-client; extra == 'google'
Requires-Dist: google-auth-httplib2; extra == 'google'
Requires-Dist: google-auth-oauthlib; extra == 'google'
Description-Content-Type: text/markdown

<div align="center">
<img src="https://raw.githubusercontent.com/ultimate-notion/ultimate-notion/master/docs/assets/images/logo_with_text.svg" alt="Ultimate-Notion logo" width="500" role="img">
</div>
<br/>

Ultimate Notion is the ultimate Python library for [Notion] 🚀 It allows you to access and modify your Notion databases and
pages in the most convenient and pythonic way.

|         |                                    |
|---------|------------------------------------|
| CI/CD   | [![Tests][Tests-image]][Tests-link] [![Coverage][Coverage-image]][Coverage-link] [![Publish Package][Publish-image]][Publish-link] [![Build Docs][Docs-image]][Docs-link] |
| Package | [![PyPI - Version][PyPI_ver-image]][PyPI_ver-link] [![PyPI - Downloads][PyPI_down-image]][PyPI_down-link] [![PyPI - Python Version][PyPI_py-image]][PyPI_py-link] |
| Details | [![Hatch project][hatch-image]][hatch-link] [![linting - Ruff][ruff-image]][ruff-link] [![Types - Mypy][mypy-image]][mypy-link] [![License - MIT][MIT-image]][MIT-link] [![GitHub Sponsors][sponsor-image]][sponsor-link] |

## Installation

Install the most recent release using [PyPI] with:

```console
pip install ultimate-notion
```

or to install all additional dependencies, use:

```console
pip install 'ultimate-notion[all]'
```

## Usage

```python
import ultimate_notion as uno

TOKEN = "secret_YOUR_TOKEN_HERE"
# Change PAGE_TITLE to the title of your page
PAGE_TITLE = "Getting Started"

with uno.Session(auth=TOKEN) as notion:
    page = notion.search_page(PAGE_TITLE).item()
    page.show()

# Alternatively, without a context manager:
notion = uno.Session.get_or_create(auth=TOKEN)
# `auth` can be omitted if `NOTION_TOKEN` is set in the environment, i.e.
# notion = uno.Session.get_or_create()
# which also works for the context manager
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] in installed globally, e.g. `pipx install hatch`,
2. make sure [pre-commit] is installed globally, e.g. with `pipx install pre-commit`,
3. optionally run `hatch config set dirs.env.virtual .direnv` to let [VS Code] find your virtual environments,

and then you are already set up to start hacking. Use `hatch run cov` or `hatch run no-cov` to run
the unitest with or without coverage reports, respectively. Check out the environment setup of
hatch in [pyproject.toml](pyproject.toml) for many more commands.

If you are using [VS Code], then it's quite convenient to add a file `.env` in your checkout with:

```ini
[pytest]
env =
    NOTION_AUTH_TOKEN=secret_YOUR_TOKEN_TO_YOUR_TEST_NOTION_ACCOUNT
```

Check out this [page about contributing] for more details.

## License & Credits

Ultimate Notion is distributed under the terms of the [MIT license](LICENSE.txt).
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].

[Notion]: https://www.notion.so/
[hatch]: https://hatch.pypa.io/
[pre-commit]: https://pre-commit.com/
[notional]: https://github.com/jheddings/notional/
[notion-sdk-py]: https://github.com/ramnes/notion-sdk-py/
[Material for MkDocs]: https://github.com/squidfunk/mkdocs-material
[GitHub Pages]: https://docs.github.com/en/pages
[Ultimate Notion documentation]: https://ultimate-notion.com/
[creating a Notion integration]: https://ultimate-notion.com/latest/usage/getting_started/
[page about contributing]: https://ultimate-notion.com/latest/contributing/
[VS Code]: https://code.visualstudio.com/
[PyPI]: https://pypi.org/

[Tests-image]: https://github.com/ultimate-notion/ultimate-notion/actions/workflows/run-tests.yml/badge.svg
[Tests-link]: https://github.com/ultimate-notion/ultimate-notion/actions/workflows/run-tests.yml
[Coverage-image]: https://img.shields.io/coveralls/github/ultimate-notion/ultimate-notion/master.svg?logo=coveralls&label=Coverage
[Coverage-link]: https://coveralls.io/r/ultimate-notion/ultimate-notion
[Publish-image]: https://github.com/ultimate-notion/ultimate-notion/actions/workflows/publish-pkg.yml/badge.svg
[Publish-link]: https://github.com/ultimate-notion/ultimate-notion/actions/workflows/publish-pkg.yml
[Docs-image]: https://github.com/ultimate-notion/ultimate-notion/actions/workflows/build-dev-docs.yml/badge.svg
[Docs-link]: https://github.com/ultimate-notion/ultimate-notion/actions/workflows/build-dev-docs.yml
[PyPI_ver-image]: https://img.shields.io/pypi/v/ultimate-notion.svg?logo=pypi&label=PyPI&logoColor=gold
[PyPI_ver-link]: https://pypi.org/project/ultimate-notion/
[PyPI_down-image]: https://img.shields.io/pypi/dm/ultimate-notion.svg?color=blue&label=Downloads&logo=pypi&logoColor=gold
[PyPI_down-link]: https://pepy.tech/project/ultimate-notion
[PyPI_py-image]: https://img.shields.io/pypi/pyversions/ultimate-notion.svg?logo=python&label=Python&logoColor=gold
[PyPI_py-link]: https://pypi.org/project/ultimate-notion/
[hatch-image]: https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg
[hatch-link]: https://github.com/pypa/hatch
[ruff-image]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
[ruff-link]: https://github.com/charliermarsh/ruff
[mypy-image]: https://img.shields.io/badge/Types-Mypy-blue.svg
[mypy-link]: https://mypy-lang.org/
[MIT-image]: https://img.shields.io/badge/License-MIT-9400d3.svg
[MIT-link]: LICENSE.txt
[sponsor-image]: https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=ff69b4
[sponsor-link]: https://github.com/sponsors/FlorianWilhelm
