langchain-google-classroom
An integration package connecting Google Classroom and LangChain.
Load courses, assignments, announcements, materials, student submissions, rubrics,
topics, rosters, and file attachments as structured LangChain Document objects
— ready for RAG pipelines, AI teaching assistants, and educational analytics.
Installation
pip install langchain-google-classroom
With optional parsers for PDF and DOCX attachments:
pip install "langchain-google-classroom[parsers]"
Quick Start
from langchain_google_classroom import GoogleClassroomLoader
# OAuth (opens browser on first run)
loader = GoogleClassroomLoader(
course_ids=["123456789"],
)
docs = loader.load()
for doc in docs:
print(f"[{doc.metadata['content_type']}] {doc.metadata.get('title', '')}")
Service Account
loader = GoogleClassroomLoader(
service_account_file="service_account.json",
)
With Attachments and Vision LLM
from langchain_google_genai import ChatGoogleGenerativeAI
loader = GoogleClassroomLoader(
course_ids=["123456789"],
load_attachments=True,
vision_model=ChatGoogleGenerativeAI(model="gemini-2.0-flash"),
)
Student Submissions, Topics, and Roster
loader = GoogleClassroomLoader(
course_ids=["123456789"],
load_submissions=True,
load_topics=True,
load_roster=True,
)
Features
- Full Classroom API coverage — assignments, announcements, materials, submissions, rubrics, topics, and roster
- Drive attachments — PDF, DOCX, CSV, text, and image parsing with Google Docs/Slides/Sheets export
- Vision LLM — embedded images described by Gemini, GPT-4V, or any
vision-capable
BaseChatModel - YouTube and link attachments — metadata captured as structured documents
- Pluggable parsers — bring your own
BaseBlobParser(PyMuPDF, Unstructured, etc.) - File size guard — configurable
max_file_sizeto skip oversized attachments - Retry with backoff — exponential backoff with jitter on HTTP 429/500/503
- Flexible auth — service accounts, OAuth, cached tokens, or pre-built credentials
- Rich metadata — course info, timestamps, due dates, grades, links on every document
- Lazy and async loading —
lazy_load()andalazy_load()for memory efficiency - Pydantic v2 — fully typed
BaseModelwithmodel_dump(), JSON schema, and automatic scope injection
For full documentation and API reference, see the GitHub repository.
Metadata
Release files for langchain-google-classroom 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_google_classroom-0.2.0.tar.gz | 43.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_google_classroom-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 75.2 kB
Release files / langchain_google_classroom-0.2.0.tar.gz
| Download URL | langchain_google_classroom-0.2.0.tar.gz |
|---|---|
| Size | 43.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9f40bea843d22eb368f88d814d7f4cf03114a8920e823ede3a0133b91b42f8e
|
|
BLAKE2b-256 checksum How to use checksums |
a0ef3b357efc953ca6a9af4530364f8682a8e0c4e7cffe629996dae1ce6fed76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.
Transparency logRelease files / langchain_google_classroom-0.2.0-py3-none-any.whl
| Download URL | langchain_google_classroom-0.2.0-py3-none-any.whl |
|---|---|
| Size | 31.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
629c42ff9d2b6a27a2f4aec0daeea6c8c6b185a498295c2ac832ee7b74df1ac2
|
|
BLAKE2b-256 checksum How to use checksums |
c6acab21f2696349738e44ee78bdb3b8dc1d506124803168679664b702a64abb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.
Transparency log