Registry / gcp / gkeepapi

gkeepapi

JSON →
library0.17.1pypypi✓ verified 35d ago

An unofficial Python client for the Google Keep API. It enables programmatic interaction with notes, lists, and reminders, supporting CRUD operations. The library is currently at version 0.17.1 and receives maintenance releases as needed to adapt to API changes or address issues.

gcphttp-networkingcommunication
Install & Compatibility
Where this runs
tested against v0.17.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.910 runs
installs and imports cleanly · install 0.0s · import 0.659s · 34MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.1s · import 0.623s · 35MB
33MB installed
● package 33MB
Code
Verified usage

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

from gkeepapi import Keep

Node types like 'Note' and 'List' reside in the `gkeepapi.node` submodule, not directly under `gkeepapi`.

from gkeepapi.node import Note
from gkeepapi.exception import InvalidUsernameOrPassword

This quickstart demonstrates how to log in to Google Keep using an app password, create a new note, sync changes, and retrieve all notes. Environment variables are used for credentials for security. Remember to replace placeholders or set actual environment variables.

import os from gkeepapi import Keep from gkeepapi.exception import InvalidUsernameOrPassword # Recommended: Use a Google App Password for programmatic access. # Generate one at: myaccount.google.com/apppasswords # Store in environment variables or directly replace placeholders. USERNAME = os.environ.get('GKEEP_USERNAME', 'your_email@example.com') APP_PASSWORD = os.environ.get('GKEEP_APP_PASSWORD', 'your_app_password') if not USERNAME or not APP_PASSWORD or APP_PASSWORD == 'your_app_password': print("Please set GKEEP_USERNAME and GKEEP_APP_PASSWORD environment variables (or replace placeholders).") print("Consider using a Google App Password for better security.") exit(1) keep = Keep() try: # Login using username and app password success = keep.login(USERNAME, APP_PASSWORD) if success: print("Login successful!") # Create a new text note note = keep.createNote('gkeepapi Quickstart Note', 'This note was created programmatically.') print(f"Created note: '{note.title}' (ID: {note.id})") # Sync changes to Google Keep keep.sync() print("Changes synced.") # Fetch and print titles of all notes print("\nAll notes in Keep:") for n in keep.all(): print(f"- {n.title}") else: print("Login failed for an unknown reason.") except InvalidUsernameOrPassword: print("Login failed: Invalid username or app password. Double-check your credentials and ensure an App Password is used.") except Exception as e: print(f"An error occurred: {e}")
Debug
Known footguns
breakingMajor API changes were introduced in versions 0.10.x, affecting authentication methods and the internal structure of node objects (`gkeepapi.node.*`). Code written for versions prior to 0.10.x will likely break.
gotchaDirectly using your primary Google account password for login is highly discouraged and often fails due to Google's security policies. This can result in 'InvalidUsernameOrPassword' errors or temporary account blocks.
gotchaAggressive or frequent API requests can lead to temporary IP bans or rate limiting by Google, resulting in HTTP 429 (Too Many Requests) errors.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
51 hits · last 30 days
gptbot
4
ahrefsbot
4
dotbot
3
chatgpt-user
3
googlebot
2
script
1
bingbot
1
petalbot
1
Resources