An integration package connecting LangchainNotion and LangChain
Project description
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
pip install -U langchain-notion
Configuration
Set your Notion API key as an environment variable before using the toolkit:
export NOTION_API_KEY="your-notion-api-key"
Usage: Notion Toolkit & Tools
The toolkit provides tools for interacting with Notion pages:
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
.gitignoreis 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.pyis kept for compatibility or future use, but is excluded from packaging.
License
This project is licensed under the MIT License.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_notion-0.1.0.tar.gz.
File metadata
- Download URL: langchain_notion-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.12.2 Linux/6.8.0-60-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cfa58605775518fd2a68603d38bc27e5ae4d655e267c5c09afc6a58434479ba
|
|
| MD5 |
57975d40b1cedff5a90928051c87285a
|
|
| BLAKE2b-256 |
8bd38166a84eb63fd65f441b7be5327f85e90fbc5aa20776410ca28016a9e804
|
File details
Details for the file langchain_notion-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_notion-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.12.2 Linux/6.8.0-60-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d572352d5eca21985da58b7b40c480d765ac8c2ee11d4aa2661e76139559685f
|
|
| MD5 |
d69bf51abef7569ba3e8d41c6241d7e1
|
|
| BLAKE2b-256 |
900a35bf06d96ac3c4eb9018b4f1d70b5aa4eced595513ab18776b8d5e422d51
|