Skip to main content

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 .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.

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

langchain_notion-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_notion-0.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

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

Hashes for langchain_notion-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4cfa58605775518fd2a68603d38bc27e5ae4d655e267c5c09afc6a58434479ba
MD5 57975d40b1cedff5a90928051c87285a
BLAKE2b-256 8bd38166a84eb63fd65f441b7be5327f85e90fbc5aa20776410ca28016a9e804

See more details on using hashes here.

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

Hashes for langchain_notion-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d572352d5eca21985da58b7b40c480d765ac8c2ee11d4aa2661e76139559685f
MD5 d69bf51abef7569ba3e8d41c6241d7e1
BLAKE2b-256 900a35bf06d96ac3c4eb9018b4f1d70b5aa4eced595513ab18776b8d5e422d51

See more details on using hashes here.

Supported by

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