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.
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
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.659s · 34MB
glibcpy 3.10–3.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}")
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.