{"id":27183,"library":"notebooklm-py","title":"notebooklm-py","description":"Unofficial Python library for automating Google NotebookLM. Current version 0.3.4, requires Python >=3.10. Released under MIT license. Active development with frequent releases (multiple per month).","status":"active","version":"0.3.4","language":"python","source_language":"en","source_url":"https://github.com/teng-lin/notebooklm-py","tags":["google","notebooklm","automation","client"],"install":[{"cmd":"pip install notebooklm-py","lang":"bash","label":"PyPI install"}],"dependencies":[],"imports":[{"note":"The main client class; instantiate with auth token or interactive login.","wrong":"","symbol":"NotebookLMClient","correct":"from notebooklm import NotebookLMClient"},{"note":"SourceType and ArtifactType are in notebooklm.models, not top-level.","wrong":"from notebooklm import SourceType","symbol":"SourceType","correct":"from notebooklm.models import SourceType"},{"note":"Model classes live in notebooklm.models.","wrong":"from notebooklm import AskResult","symbol":"AskResult","correct":"from notebooklm.models import AskResult"}],"quickstart":{"code":"from notebooklm import NotebookLMClient\nimport os\n\nclient = NotebookLMClient(auth_json=os.environ.get('NOTEBOOKLM_AUTH_JSON', ''))\n\nnotebooks = client.notebooks.list()\nif notebooks:\n    notebook_id = notebooks[0].id\n    result = client.chat.ask(notebook_id, 'What is the summary of this notebook?')\n    print(result.answer)","lang":"python","description":"Initialize client (with auth JSON or interactive login), list notebooks, ask a question."},"warnings":[{"fix":"Run 'notebooklm auth check' or use NotebookLMClient(auth_json=...) with the JSON env var.","message":"Auth method changed: 0.3.0+ uses persistent cookie storage (notebooklm auth), not manual cookie passing.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Change 'from notebooklm import SourceType' to 'from notebooklm.models import SourceType'.","message":"SourceType and ArtifactType moved to notebooklm.models in 0.3.0. Direct top-level import broken.","severity":"breaking","affected_versions":"<0.3.0"},{"fix":"Catch NotebookLMError from notebooklm.exceptions instead of generic Exception.","message":"Exception hierarchy introduced in 0.3.0; generic exceptions replaced with 'from notebooklm.exceptions import *'.","severity":"breaking","affected_versions":"<0.3.0"},{"fix":"Use async entry points or run with asyncio.run(). For sync cook, ensure ProactorEventLoop compatibility.","message":"All async I/O must run in an event loop; blocking calls from sync context may hang on Windows.","severity":"gotcha","affected_versions":"<=0.3.4"},{"fix":"Upgrade to 0.3.2+ or manually clear conversation ID.","message":"CLI conversation ID does not reset when switching notebooks; may cause answers from wrong notebook.","severity":"gotcha","affected_versions":"<0.3.2"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use: from notebooklm import NotebookLMClient","cause":"Trying to import NotebookLMClient from wrong location.","error":"AttributeError: module 'notebooklm' has no attribute 'NotebookLMClient'"},{"fix":"Use: from notebooklm.models import SourceType","cause":"SourceType was moved to notebooklm.models in 0.3.0.","error":"ImportError: cannot import name 'SourceType' from 'notebooklm'"},{"fix":"Wrap code in async function and call with asyncio.run() or use CLI commands.","cause":"Attempting to use async client from sync context without event loop.","error":"RuntimeError: NotebookLMClient must be used inside an asyncio event loop"},{"fix":"Run 'notebooklm auth check --test' to validate. Set NOTEBOOKLM_AUTH_JSON env var with fresh token.","cause":"Auth JSON missing, malformed, or expired.","error":"ValueError: Invalid auth JSON or expired authentication"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}