Registry / llm-agents / langchain-google-calendar-tools

langchain-google-calendar-tools

JSON →
library0.0.1pypypiunverified

This package, `langchain-google-calendar-tools` (version 0.0.1), is an early-stage project or demonstration for connecting to the Google Calendar API within LangChain. It appears to be a separate, less maintained effort. For robust and actively supported Google Calendar integrations with LangChain, it is *strongly recommended* to use the `langchain-google-community` package with the `calendar` extra, which provides comprehensive and up-to-date tools for calendar operations. This entry focuses on the requested `langchain-google-calendar-tools` but highlights the recommended alternative.

pip install langchain-google-calendar-tools
INSTALL
IMPORT
SIG · LANGCHAIN-GOOGLE-C
L
langchain-google-calendar-tools
llm-agentspythonv0.0.1
Install
16.2s avg
Import
4908ms
Disk
539MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 5.323s · 493.9MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 16.2s · import 4.493s · 561MB
539MB installed
● package 539MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CalendarToolkit
from langchain_google_calendar_tools import CalendarToolkit
from langchain_google_calendar_tools import CalendarToolkit

This quickstart demonstrates the recommended way to initialize the Google Calendar Toolkit and individual tools using `langchain-google-community`. It assumes you have `credentials.json` configured as per Google's OAuth 2.0 Desktop App flow. The toolkit will automatically attempt to use these credentials.

import os import getpass # Ensure you have a credentials.json file from Google Cloud Project setup # See https://developers.google.com/calendar/api/quickstart/python # Install the recommended package: # pip install -qU langchain-google-community[calendar] from langchain_google_community import CalendarToolkit from langchain_google_community.calendar.tool import CalendarCreateEvent, CalendarSearchEvents # Initialize the toolkit. It defaults to reading credentials.json # You might need to place credentials.json in the root of your project # or specify the path to the credentials file. # For custom authentication, refer to LangChain documentation. try: toolkit = CalendarToolkit() # You can also use individual tools directly create_event_tool = CalendarCreateEvent() search_events_tool = CalendarSearchEvents() print("CalendarToolkit initialized successfully.") # Example: Accessing a tool (this won't run without proper OAuth flow) # For a full example, you would typically integrate with an agent. # print(search_events_tool.name) except Exception as e: print(f"Error initializing CalendarToolkit: {e}") print("Please ensure 'credentials.json' is correctly set up and OAuth flow is completed.") print("Refer to LangChain's Google Calendar documentation for detailed setup.")
Debug
Known issues
breakingThe original `langchain-google-calendar-tools` package (v0.0.1) is not actively maintained and has limited functionality. The LangChain ecosystem has moved to `langchain-google-community[calendar]` for Google Calendar integrations.
fix
Migrate to `pip install -qU langchain-google-community[calendar]` and update import paths as shown in the quickstart.
affects: 0.0.1 and potentially other pre-release versions of `langchain-google-calendar-tools`.
gotchaAuthentication for Google Calendar tools requires a `credentials.json` file obtained from a Google Cloud Project with the Calendar API enabled, configured for a 'Desktop app' OAuth client. Without correct setup, tools will fail to initialize or perform actions.
fix
Follow the Google Calendar API Python Quickstart (https://developers.google.com/calendar/api/quickstart/python) to set up a Google Cloud Project, enable the Google Calendar API, and download `credentials.json`. Place this file where your application can access it (e.g., project root) or specify its path when initializing the toolkit/tools.
affects: All versions using Google Calendar API.
gotchaWhen using `langchain-google-community` with some LLMs (e.g., Gemini), an empty `properties` object in tool schemas for tools that don't require parameters can cause `Invalid argument` errors.
fix
This is a known issue, often requiring updates to `langchain-google-genai` and underlying `google-auth`, `google-genai` libraries. Ensure all LangChain Google-related packages are up-to-date. If the problem persists, consult the latest LangChain GitHub issues or documentation regarding specific LLM integrations.
affects: langchain-google-community 2.0.7 and potentially others when used with Gemini models.
Upgrade
Version history
0.0.1latest on PyPI · released Nov 30, 2023
Audit
Dependencies
langchainrequiredCore LangChain framework dependency.
google-api-python-clientrequiredInteracts with Google APIs.
google-auth-oauthlibrequiredHandles Google OAuth2 authentication flow.
google-auth-httplib2requiredProvides HTTP client for Google Auth.
Agent activity
37 hits · last 30 days
node
34
OpenAI (training)
1
Resources
langchain-google-calendar-tools — pip install langchain-google-calendar-tools · libregistry