Metadata-Version: 2.3
Name: langchain-notion
Version: 0.1.0
Summary: An integration package connecting LangchainNotion and LangChain
License: MIT
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: langchain-core (>=0.3.15,<0.4.0)
Requires-Dist: notion-client (>=2.4.0,<3.0.0)
Project-URL: Repository, https://github.com/langchain-ai/langchain
Project-URL: Release Notes, https://github.com/langchain-ai/langchain/releases?q=tag%3A%22notion%3D%3D0%22&expanded=true
Project-URL: Source Code, https://github.com/langchain-ai/langchain/tree/master/libs/partners/notion
Description-Content-Type: text/markdown

# langchain-notion

This package provides a LangChain integration for interacting with Notion via the LangchainNotion toolkit and tools. It enables you to access, search, create, and update Notion pages programmatically using LangChain interfaces.

## Installation

```bash
pip install -U langchain-notion
```

## Configuration

Set your Notion API key as an environment variable before using the toolkit:

```bash
export NOTION_API_KEY="your-notion-api-key"
```

## Usage: Notion Toolkit & Tools

The toolkit provides tools for interacting with Notion pages:

```python
import os
from langchain_notion.toolkits import LangchainNotionToolkit
from langchain_notion.notion_wrapper import NotionWrapper

key = os.environ.get("NOTION_API_KEY")
api = NotionWrapper(api_key=key)
toolkit = LangchainNotionToolkit.from_notion_wrapper(api)
tools = toolkit.get_tools()

# Example: Search for pages
tool = next(t for t in tools if t.name == "Search Pages")
print(tool.run({"query": "test"}))
```

## Project Structure & Maintenance

- All code is in the `langchain_notion/` directory.
- Tests are in `tests/unit_tests/`.
- The `.gitignore` is set up to ignore all build, cache, and notebook checkpoint files.
- Unused scripts and placeholder files have been removed for clarity and maintainability.
- `main_test.py` is kept for compatibility or future use, but is excluded from packaging.

## License

This project is licensed under the MIT License.

