Skip to main content

An integration package connecting Google Classroom and LangChain

Project description

langchain-google-classroom

PyPI - Version PyPI - License PyPI - Downloads CI

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_size to 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 loadinglazy_load() and alazy_load() for memory efficiency
  • Pydantic v2 — fully typed BaseModel with model_dump(), JSON schema, and automatic scope injection

For full documentation and API reference, see the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_google_classroom-0.2.0.tar.gz (43.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_google_classroom-0.2.0-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file langchain_google_classroom-0.2.0.tar.gz.

File metadata

File hashes

Hashes for langchain_google_classroom-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c9f40bea843d22eb368f88d814d7f4cf03114a8920e823ede3a0133b91b42f8e
MD5 015d725efbcb8a5e6e57ef3268db015f
BLAKE2b-256 a0ef3b357efc953ca6a9af4530364f8682a8e0c4e7cffe629996dae1ce6fed76

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_google_classroom-0.2.0.tar.gz:

Publisher: _release.yml on ayanokojix21/langchain-google-classroom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file langchain_google_classroom-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_google_classroom-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 629c42ff9d2b6a27a2f4aec0daeea6c8c6b185a498295c2ac832ee7b74df1ac2
MD5 4c0be1eff492329a01074bd7e505e118
BLAKE2b-256 c6acab21f2696349738e44ee78bdb3b8dc1d506124803168679664b702a64abb

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_google_classroom-0.2.0-py3-none-any.whl:

Publisher: _release.yml on ayanokojix21/langchain-google-classroom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page